|
1 | 1 | { |
2 | | -# setup environment |
3 | | -rm( list = ls() ) |
4 | | -setwd("~/Documents/DescriptiveRepresentationCalculator-software") |
5 | | -PackageName <- "DescriptiveRepresentationCalculator" |
6 | | -package_path <- sprintf("~/Documents/%s-software/%s",PackageName,PackageName) |
7 | | -versionNumber <- "1.1.0" |
8 | | - |
9 | | - |
10 | | -# build documentation |
11 | | -library(devtools); library(utils) |
12 | | -devtools::document(package_path) |
13 | | -try(file.remove("./DescriptiveRepresentationCalculator.pdf"),T) |
14 | | -devtools::document(package_path) |
15 | | -#devtools::build_manual(package_path) |
16 | | -system(paste(shQuote(file.path(R.home("bin"), "R")), |
17 | | - "CMD", "Rd2pdf", shQuote(package_path))) |
18 | | - |
19 | | -setwd("~/Documents/") |
20 | | - |
21 | | -# build tar |
22 | | -system( paste(shQuote(file.path(R.home("bin"), "R")), |
23 | | - "R CMD build --resave-data", shQuote(package_path)) ) |
24 | | - |
25 | | -# check package to ensure it meets CRAN standards. |
26 | | -devtools::check( package_path, cran = T ) |
27 | | - |
28 | | -# check as cran |
29 | | -system( paste(shQuote(file.path(R.home("bin"), "R")), |
30 | | - "R CMD check --as-cran", |
31 | | - shQuote( |
32 | | - paste(PackageName, "_", versionNumber, ".tar.gz", sep = "") |
33 | | - )) ) |
| 2 | + # setup environment |
| 3 | + rm( list = ls() ) |
| 4 | + setwd("~/Documents/DescriptiveRepresentationCalculator-software") |
| 5 | + PackageName <- "DescriptiveRepresentationCalculator" |
| 6 | + package_path <- sprintf("~/Documents/%s-software/%s",PackageName,PackageName) |
| 7 | + versionNumber <- "1.1.0" |
| 8 | + |
| 9 | + # build documentation |
| 10 | + library(devtools); library(utils) |
| 11 | + try(file.remove("./DescriptiveRepresentationCalculator.pdf"),T) |
| 12 | + devtools::document(package_path) |
| 13 | + system(paste(shQuote(file.path(R.home("bin"), "R")), |
| 14 | + "CMD", "Rd2pdf", shQuote(package_path))) |
| 15 | + |
| 16 | + setwd("~/Documents/") |
| 17 | + |
| 18 | + # build tar |
| 19 | + system( paste(shQuote(file.path(R.home("bin"), "R")), |
| 20 | + "R CMD build --resave-data", shQuote(package_path)) ) |
| 21 | + |
| 22 | + # check package to ensure it meets CRAN standards. |
| 23 | + devtools::check( package_path, cran = T ) |
| 24 | + |
| 25 | + # check as cran |
| 26 | + system( paste(shQuote(file.path(R.home("bin"), "R")), |
| 27 | + "R CMD check --as-cran", |
| 28 | + shQuote( |
| 29 | + paste(PackageName, "_", versionNumber, ".tar.gz", sep = "") |
| 30 | + )) ) |
34 | 31 | } |
0 commit comments