If you want to create a new formods module this function will create the template files for you.
Usage
new_module_template(
SN = "NM",
Module_Name = "New Module",
package = "pkgname",
element = "analysis",
file_dir = tempdir()
)
Arguments
- SN
Module short name
- Module_Name
Module long name
- package
Name of package that will contain the module
- element
What you would call the thing the module provides for example the FG module provides "figures", the DW module provides "data views".
- file_dir
Directory to save file
Value
list with the following elements:
mc: Module components.
server: Server.R file.
yaml: Yaml configureation file.
Each of these is a list with paths to the respective files:
source: Template source.
dest: Destination file name.
dest_full: Full path to the destination file name.
Examples
new_module_template()
#> $mc
#> $mc$source
#> [1] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpNZoppn/temp_libpathad101dd5172f/formods/templates/ZZ_module_components.R"
#>
#> $mc$dest
#> [1] "NM_module_components.R"
#>
#> $mc$dest_full
#> [1] "/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpUdhu6j/NM_module_components.R"
#>
#>
#> $server
#> $server$source
#> [1] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpNZoppn/temp_libpathad101dd5172f/formods/templates/ZZ_Server.R"
#>
#> $server$dest
#> [1] "NM_Server.R"
#>
#> $server$dest_full
#> [1] "/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpUdhu6j/NM_Server.R"
#>
#>
#> $yaml
#> $yaml$source
#> [1] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpNZoppn/temp_libpathad101dd5172f/formods/templates/ZZ.yaml"
#>
#> $yaml$dest
#> [1] "NM.yaml"
#>
#> $yaml$dest_full
#> [1] "/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpUdhu6j/NM.yaml"
#>
#>
#> $funcs
#> $funcs$source
#> [1] "/private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpNZoppn/temp_libpathad101dd5172f/formods/templates/ZZ_funcs.R"
#>
#> $funcs$dest
#> [1] "NM_funcs.R"
#>
#> $funcs$dest_full
#> [1] "/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T//RtmpUdhu6j/NM_funcs.R"
#>
#>