Learn R Programming

systemPipeR (version 1.6.2)

writeTargetsout: Write updated targets out to file

Description

Convenience write function for generating targets files with updated FileName columns containing the paths to files generated by input/output processes. These processes can be commandline- or R-based software. Typically, the paths to the inputs are stored in the targets infile (targetsin(args)) and the outputs are stored in the targets outfile (targetsout(args)). Note: by default the function cannot overwrite any existing files. If a file exists then the user has to explicitly remove it or set overwrite=TRUE.

Usage

writeTargetsout(x, file = "default", silent = FALSE, overwrite=FALSE, ...)

Arguments

x
Object of class SYSargs.
file
Name and path of output file. If set to "default" then the name of the output file will have the pattern 'targets_.txt', where will be what software(x) returns.
silent
If set to TRUE, all messages returned by the function will be suppressed.
overwrite
If set to TRUE, existing files of same name will be overwritten.
...
To pass on additional arguments.

Value

  • Writes tabular targes files containing the header/comment lines from targetsheader(x) and the columns from targetsout(x).

See Also

writeTargetsRef

Examples

Run this code
## Create SYSargs object
param <- system.file("extdata", "tophat.param", package="systemPipeR")
targets <- system.file("extdata", "targets.txt", package="systemPipeR")
args <- systemArgs(sysma=param, mytargets=targets)

## Write targets out file
writeTargetsout(x=args, file="default")

Run the code above in your browser using DataLab