Description Usage Arguments Details Value See Also Examples
Preprocess R code files using a simple swapping algorithm. Files are modified in-place, hence this is potentially dangerous and should best be applied if the package directory to document, check and/or install is not the one in which coding is done but a copy of it.
1 2 3 4 |
x |
Character vector of names of input files, or
names of R package directories. The latter will be
expanded as appropriate. |
... |
Optional arguments, currently passed as
|
ignore |
|
The code preprocessing works simply as follows: Lines are split at the first occurrence of ‘#||’, if any, the parts reversed and joined again with a space character, including the separator. Leading whitespace is kept. Whitespace around the parts, if any, is removed (effectively transformed to a single space). There is no check done to ensure that the part moved in front of the comment character is syntactically valid in its context, or correct or useful code. For instance, the line SEALED <- FALSE #|| SEALED <- TRUE would be modified to SEALED <- TRUE #|| SEALED <- FALSE, i.e. this could be used to change a package constant before conducting any checking. Note, however, that lines starting with a roxygen2 comment will not be modified.
This preprocessing is currently implemented in a Ruby
script that comes with the package. It is automatically
found in the installation directory but fails if a
suitable version of Ruby, i.e. ≥ 1.9.0, is
unavailable. See run_ruby
for details.
Currently the return value of the call to
run_ruby
.
Other package-functions: check_R_code
,
check_Sweave_start
,
copy_pkg_files
,
delete_o_files
,
is_pkg_dir
,
logfile
, pack_desc
,
pkg_files
,
run_R_CMD
,
1 | # See the 'docu.R' script provided with the package, option '--preprocess'.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.