Description Usage Arguments Details Value Methods (by class) Note Author(s) See Also Examples
Write a file for the specified object
1 2 3 4 5 6 | write_file(object, filepath, append = FALSE,
encoding = getOption("encoding"), ...)
## S4 method for signature 'ScriptOutput'
write_file(object, filepath = "dmscript",
append = FALSE, encoding = getOption("encoding"), ...)
|
object |
Object to be written as a |
filepath |
Where to write the file. No need to add the extension, it will be put following the language of ScriptOutput. If an extension is given, then it will be used |
append |
Append Append the file. |
encoding |
Character encoding to use. Use the default encoding if not specified. |
... |
other options for specific methods |
If the object is a ScriptOutput
object, it will write a script skeleton file .
Return invisibly the file path of the new file
ScriptOutput
:
Will be extended to others vartors objects in future releases. I don't use the write
function because it is not a S3 or a S4 method and it's hard to promote in a good way.
Joris Muller
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Import a data.frame containing the description of the variables
# Show the description of the variable
sample_descvar
# Create the script skeleton simply with create_script()
script_skeleton <- create_script(sample_descvar)
# watch the result
script_skeleton
# Could be written in a file with the write() method
## Not run:
write_file(script_skeleton)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.