Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Create a module

Source:R/modules_fn.R
add_module.Rd

This function creates a module inside theR/ folder, basedon a specific module structure. This function can be used outsideof a{golem} project.

Usage

add_module(name,  golem_wd=get_golem_wd(),  open=TRUE,  dir_create=TRUE,  fct=NULL,  utils=NULL,  r6=NULL,  js=NULL,  js_handler=NULL,  export=FALSE,  module_template=golem::module_template,  with_test=FALSE,...,pkg)

Arguments

name

The name of the module.

golem_wd

Path to the root of the package. Default isget_golem_wd().

open

Should the created file be opened?

dir_create

Creates the directory if it doesn't exist, default isTRUE.

fct

If specified, creates amod_fct file.

utils

If specified, creates amod_utils file.

r6

If specified, creates amod_class file.

js, js_handler

If specified, creates a module related JavaScript file.

export

Should the module be exported? Default isFALSE.

module_template

Function that serves as a module template.

with_test

should the module be created with tests?

...

Arguments to be passed to themodule_template function.

pkg

Deprecated, please use golem_wd instead

Value

The path to the file, invisibly.

Note

This function will prefix thename argument withmod_.

See also

module_template()


[8]ページ先頭

©2009-2025 Movatter.jp