Description Usage Arguments Value Examples
Add dependencies to a DESCRIPTION file
1 2 |
replacements |
A character string of packages to add/replace |
field |
Which field should be modified (defaults to "Imports") |
file |
The DESCRIPTION file. |
name |
The name of the project (in the case that the DESCRIPTION does not exist.) |
write |
a logical. If 'TRUE', DESCRIPTION file will be overwritten, if 'FALSE', the file will be printed to screen. |
if 'write = TRUE', NULL, if 'write = FALSE', the DESCRIPTION file will be printed to screen.
1 2 3 4 5 6 7 8 | # a superficial example with this package's DESCRIPTION file
LIB <- .libPaths()[1]
pkg <- file.path(LIB, "diaper", "DESCRIPTION")
# note the Dependency version for R
write.dcf(read.dcf(pkg))
# now we change it to be 3.0
add(replacements = "R (>= 3.0.0)", field = "Depends",
file = pkg, write = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.