Description Usage Arguments Value Examples
View source: R/utils_helpers.R
Reads a plain text file line by line, evaluating each line. Useful for creating variables dynamically, e.g. reading in parameters.
1 | eval_lines(filepath)
|
filepath |
Filepath as a String. |
Nothing
1 2 3 4 5 6 7 8 9 | filepath <- tempfile()
writeLines(
text = "LEFT = \"right\"",
con = filepath
)
eval_lines(filepath)
print(LEFT)
unlink(filepath) # delete temporary file
rm(left) # remove example variable
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.