Functionality for processing file system ressources
require("devtools")
devtools::install_github("Rappster/conditionr")
devtools::install_github("Rappster/repositr")
devtools::install_github("Rappster/libr")
require("libr")
Compress library
compressLibrary(to = tempdir(), add_timestamp = TRUE)
# ...
# adding: whisker/tests/testinterpolation.R (deflated 85%)
# adding: whisker/tests/testinverted.R (deflated 79%)
# adding: whisker/tests/testpartials.R (deflated 76%)
# adding: whisker/tests/testsections.R (deflated 80%)
# [1] "C:/Users/jat/AppData/Local/Temp/RtmpmUzR0I/library_20141005135348.zip"
Delete library
deleteLibrary(lib = "/path/to/non-standard/lib")
NOTE: The function makes sure that you don't accidentally delete your user or system package library
deleteLibrary(lib = R.home("library"))
# Error in deleteLibrary(lib = R.home("library")) :
# 2014-10-05 14:28:49/libr/deleteLibrary/UnauthorizedLibraryOperation>
# Standard libraries cannot be deleted //
# [1] * Library: Q:/home/apps/rapptools/apps/r/R-3.1.1/library
Ensure latest package versions
NOTE: has not reached productive state yet!
ensureLatestPackageVersions(
lib = "/path/to/lib",
repos = "/path/to/repository",
pkgs = "names of packages to be considered"
)
package
``` asPackage()
authors@r
2. Specify path to package project explicitly
```
asPackage(x = "path/to/package/project")
``` asPackage(x = "devtools")
authors@r
### Unload package
1. Current working directory corresponds to package project
```
## For package 'libr'
devtools::load_all()
# Loading libr
"libr" %in% loadedNamespaces()
# [1] TRUE
unloadPackage()
"libr" %in% loadedNamespaces()
# [1] FALSE
```
devtools::load_all(pkg = "/path/to/package/project")
"libr" %in% loadedNamespaces()
unloadPackage(pkg = "/path/to/package/project") "libr" %in% loadedNamespaces()
3. Name of loaded package
```
require("devtools")
"devtools" %in% loadedNamespaces()
# [1] TRUE
unloadPackage(pkg = "devtools")
"devtools" %in% loadedNamespaces()
# [1] FALSE
Is directory a package library?
isLibrary(R.home("library"))
# [1] TRUE
isLibrary("path/to/non-library/directory")
# [1] FALSE
Is package installed?
isPackageInstalled("devtools")
# [1] TRUE
isPackageInstalled("some.package")
# [1] FALSE
Is package loaded?
isPackageLoaded("devtools")
# [1] FALSE
require("devtools")
isPackageLoaded("devtools")
# [1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.