Description Usage Arguments Value See Also Examples
fwrite_fwf
takes as basic input a data.table and the schema for
the fwf file to write, concatenates columns accordingly and uses fwrite
to write the file on disk.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | fwrite_fwf(
data,
filename,
StfwfSchema,
validate = FALSE,
justify = "left",
...
)
## S4 method for signature 'data.frame,character,StfwfSchema'
fwrite_fwf(
data,
filename,
StfwfSchema,
validate = FALSE,
justify = "right",
...
)
|
data |
data.table with the data to write. |
filename |
Character vector of length 1 with the name of the file to write. |
StfwfSchema |
Object of class StfwfSchema with the schema of the file. |
validate |
Logical vector of length 1 with default value |
justify |
Character vector of length 1 with default value |
... |
Other parameters from |
Returns an invisible NULL
. The dataset is written in file filename
.
1 2 3 4 5 6 7 8 | ## Not run:
# file will be written to working directory
path <- system.file('extdata', package = 'fastReadfwf')
stSchema <- fastReadfwf::xlsxToSchema(file.path(path, 'SchemaSNHS.xlsx'), 'stSchema')
data(MicroDataSNHS)
fwrite_fwf(MicroDataSNHS, file.path(getwd(), 'MicroDataSNHS'), stSchema, justify = 'right')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.