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