| convert | R Documentation |
Converts an scdf object into R code that can be used to recreate the object.
convert(
scdf,
file = "",
study_name = "study",
case_name = "case",
inline = FALSE,
indent = 2,
silent = FALSE
)
scdf |
A single-case data frame. See |
file |
A filename for exporting the syntax. If an empty string (default), the syntax is not written to a file. |
study_name |
Character string. Name of the study object. |
case_name |
Character string. Name of the scdf objects. |
inline |
If TRUE, phase definition is in an online version. |
indent |
Integer. Indentation. |
silent |
If TRUE, syntax is not printed to the console. |
This function is useful for exporting scdf objects for sharing or documentation purposes. The generated R code can be sourced to recreate the original scdf object.
Returns a string (invisible).
Juergen Wilbert
Other io-functions:
read_scdf(),
write_scdf()
filename <- tempfile()
convert(exampleABC, file = filename)
source(filename)
all.equal(study, exampleABC)
unlink(filename)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.