c-ScriptOutput-method: Concatenate ScriptOutput objects together.

Description Usage Arguments Details Author(s) See Also Examples

Description

Concatenate ScriptOutput objects together.

Usage

1
2
## S4 method for signature 'ScriptOutput'
c(x, ..., recursive = FALSE)

Arguments

x

The first ScriptOutput object.

...

Others ScriptOutput object to be concatened.

Details

This is a c method specific for ScriptOutput objects. All ScriptOutput objects must use the same language (.R or .Rmd). The header and the footer of the first object will be used for all. It is used in vartors by create_script to create a script for more than one variable.

Author(s)

Joris Muller

See Also

The c function and the ScriptOutput class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Create a script output from a description table
myscript <- create_script(variables_description_bad_database)

# But you forget a variable.
# Create it as a VariableDef object
forgoten_var <- vardef(varlabel = "A forgotten variable", rname = "forget", type = "integer")
forgoten_var

# Create a script for it
forgoten_script <- create_script(forgoten_var)
forgoten_script

# Add it to the initial script
my_complete_script <- c(myscript, forgoten_script)

# Watch the result
## Not run: 
my_complete_script

# Write the script in a file
write_file(my_complete_script, "my_import_script.R")

## End(Not run)

jomuller/vartors documentation built on May 19, 2019, 7:26 p.m.