Description Usage Arguments Details Value
View source: R/under_construction.R
Use under_construction
to simplify the task of creating and
updating your code. Warning: To get the full advantage of this
function, the logic argument clean_workspace
should be
changed from its default value FALSE
to TRUE
.
1 2 | under_construction(.uc_fun, .uc_package_name = NULL, ...,
high_details_level = FALSE, clean_workspace = FALSE, script_files = "")
|
.uc_fun |
The function that we want to construct. |
.uc_package_name |
The name of a package, that must be available on
the search-path. Use this argument if |
... |
Arguments to be used by targeted function |
high_details_level |
Logic argument with default value
|
clean_workspace |
Logic argument that should be set to
|
script_files |
Use this if you need to run some scripts in
order to get |
The idea of this function is to ease the construction and
maintenance of your code, but it must be used in tandem with
capture_env
to reach this goal. The code
capture_env()
should be included in the targeted
function, in order to create a (cloned) copy of that functions
environment in the workspace (the global environment). The
contribution of under_construction
is to add the
arguments of the targeted function (only when necessary). It
will also take care of attach
and detach
on the
above mentioned environment, and it will list the content of
the environment. In addition, if the logic argument
codeclean_workspace is set to its recommended value
TRUE
, then the workspace will be cleansed for
superfluous stuff at every running.
When used in tandem with capture_env
, this function
will list and attach the objects that function captured. If
clean_workspace
is set to TRUE
, there will also
be a cleansing of the workspace. If there's no
capture_env()
inside the body of the targeted function,
then the function will run as if called directly, and if it
does not fail any results from it will be returned via
under_construction
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.