sourcing | R Documentation |
Functions for extending sourcing features
ksource(file, ..., quiet = TRUE, cd = FALSE, env = parent.frame())
try_source(file, cd = FALSE, ...)
try_ksource(file, ...)
file |
An R or Rmd file. |
... |
Additional arguments passed to |
quiet |
Logical; Determines whether to apply silence to |
cd |
Logical; if TRUE, the R working directory is temporarily changed to the directory containing file for evaluating |
env |
An environment determining where the parsed expressions are evaluated |
try_source()
will output an error message rather than completely preventing
the execution.
This can be useful for when a script calls on multiple, independent files to
be sourced and a single failure shouldn't prevent the entire run to fail as
well.
ksource()
: Invisibly, the result of calling source()
on the .R
file conversion of file
try_source()
, try_ksource()
: attempts of source()
and ksource()
but converts errors to warnings
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.