init | R Documentation |
init()
looks for .R
scripts in a project root (current working
directory) that contain a specified prefix and separator. Then, it creates a
Makefile
with rules describing how to run discovered scripts.
init(
prefix = "build",
sep = "_",
path = ".",
ignore_case = TRUE,
command_args = ""
)
prefix |
Character. Prefix that solicited build scripts have in
common. It is trimmed and stripped in the list of |
sep |
Character. Separator between |
path |
Character. Path being searched. Default to the project
root (i.e. ".", the current working directory, call |
ignore_case |
Logical. Should the search be case-sensitive? Default to FALSE. |
command_args |
Single character. Command argument(s) to include
after the recipe call. Command argument can be picked up by your script
with |
The build script names should all follow a common pattern that is both human and machine readable. Filename should incorporate a prefix ("build" by default) and the "body" describing what the given script builds. Those two essential parts are separated by underscore (i.e. "_") by default as it helps with the readability. Both parts are configurable (see below), but we encourage you not to make any changes. Do not forget that build scripts are matched for a prefix and separator concatenated together, so the script named "build.R" won't be recognized, as it doesn't begin with "build_". Follow the example below on how to include "build.R".
No return value. Called for side effects.
Jan Netik
Other functions from buildr trinity:
aim()
,
build()
## Not run:
# if you stick with the defaults, run:
init()
# if you want to include "build.R",
# you have to tell {buildr} to
# use an empty separator, like:
init(sep = "")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.