Skip to content
Snippets Groups Projects
Commit 248eacdc authored by Fernando Mayer's avatar Fernando Mayer
Browse files

new methods to build and test the package

parent c4765145
Branches
No related tags found
No related merge requests found
## require(roxygen2) ## Script to build and verify the package
## setwd("/home/walmes/GitHub/")
## roxygenise(package.dir="wzRfun")
require(devtools) ## Set working directory
wd <- "~/GitLab/legTools"
setwd(wd)
if(!grepl(x=getwd(), pattern="/legTools$")){ if(!grepl(x=getwd(), pattern="/legTools$")){
stop("Move to /legTools directory.") stop("Move to /legTools directory.")
} }
## Packages
library(devtools)
## Create/update NAMESPACE, *.Rd files. ## Create/update NAMESPACE, *.Rd files.
document() document()
## Check documentation. ## Check documentation.
check_doc() check_doc()
## Check functions, datasets, run examples, etc. ## Check functions, datasets, run examples, etc. Using cleanup = FALSE
check() ## and check_dir = "../" will create a directory named legTools.Rcheck
## with all the logs, manuals, figures from exemples, etc.
check(cleanup = FALSE, manual = TRUE, vignettes = FALSE,
check_dir = "../")
## Load the package. ## Load the package.
load_all() load_all()
...@@ -24,5 +30,11 @@ load_all() ...@@ -24,5 +30,11 @@ load_all()
ls("package:legTools") ls("package:legTools")
packageVersion("legTools") packageVersion("legTools")
## build() ## Build the package (it will be one directory up)
build(manual = TRUE, vignettes = FALSE)
## build_win() ## build_win()
## Test install with install.packages
pkg <- paste("../legTools_", packageVersion("legTools"),
".tar.gz", sep = "")
install.packages(pkg, repos = NULL)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment