|
| 1 | +install.packages("bfast") |
| 2 | +install.packages("phenopix") |
| 3 | +here() |
| 4 | +setwd("~/shares/home/code/R/_gitlab/") |
| 5 | +pkgs <- c("RobinsonMaps") |
| 6 | +i <- 1 |
| 7 | +setwd(pkgs[i]) |
| 8 | +cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") |
| 9 | +tryCatch(system(cmd), finally=setwd(path)) |
| 10 | +getwd() |
| 11 | +pkgs <- c("RobinsonMaps", "ModelDataComp") |
| 12 | +setwd("..") |
| 13 | +setwd(pkgs[i]) |
| 14 | +cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") |
| 15 | +tryCatch(system(cmd)) |
| 16 | +setwd("..") |
| 17 | +getwd() |
| 18 | +pkgs <- c("RobinsonMaps", "ModelDataComp") |
| 19 | +i <- 2 |
| 20 | +setwd(pkgs[i]) |
| 21 | +cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") |
| 22 | +tryCatch(system(cmd)) |
| 23 | +setwd("..") |
| 24 | +install.packages("lhs") |
| 25 | +setwd("~/shares/home/code/R/_gitlab/") |
| 26 | +pkgs <- c("RobinsonMaps", "ModelDataComp") |
| 27 | +i <- 2 |
| 28 | +setwd(pkgs[i]) |
| 29 | +cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") |
| 30 | +tryCatch(system(cmd)) |
| 31 | +setwd("..") |
| 32 | +install.packages("randomForest") |
| 33 | +i <- 2 |
| 34 | +setwd(pkgs[i]) |
| 35 | +cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") |
| 36 | +tryCatch(system(cmd)) |
| 37 | +setwd("..") |
| 38 | +pkgs <- c("RobinsonMaps", "ModelDataComp", "Raster4ML") |
| 39 | +i <- 3 |
| 40 | +setwd(pkgs[i]) |
| 41 | +cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") |
| 42 | +tryCatch(system(cmd)) |
| 43 | +setwd("..") |
| 44 | +install.packages("ICEbox") |
| 45 | +install.packages("ff") |
| 46 | +setwd("~/shares/home/code/R/greenbrown") |
| 47 | +cmd <- paste("R CMD INSTALL --html greenbrown --resave-data") |
| 48 | +tryCatch(system(cmd)) |
| 49 | +setwd("~/shares/home/code/R/_gitlab/") |
| 50 | +pkgs <- c("RobinsonMaps", "ModelDataComp", "Raster4ML") |
| 51 | +i <- 3 |
| 52 | +setwd(pkgs[i]) |
| 53 | +cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") |
| 54 | +tryCatch(system(cmd)) |
| 55 | +setwd("..") |
| 56 | +setwd("~/shares/home/code/R/_gitlab-pik/LPJmLmdi/") |
| 57 | +tryCatch(system("R CMD INSTALL --html LPJmLmdi --resave-data")) |
| 58 | +grep("o", letters) |
| 59 | +# package development is based on inlinedocs (for in-line documentation) |
| 60 | +library(inlinedocs) |
| 61 | +library(here) |
| 62 | +# name and directory of package |
| 63 | +pkg.name <- "LPJmLmdi" |
| 64 | +path <- paste(here::here(), sep="/") |
| 65 | +# Building is only required if you further develop the package, i.e. if you want to newly |
| 66 | +# create help files and perform tests. Continue with the next section if you just downloaded |
| 67 | +# the package and you want to install it. |
| 68 | +# build package structure and Rd files |
| 69 | +setwd(path) |
| 70 | +package.skeleton.dx(pkg.name) |
| 71 | +# check package |
| 72 | +cmd <- sprintf(paste("%s CMD check --as-cran", pkg.name), file.path(R.home("bin"), "R")) |
| 73 | +system(cmd, intern=TRUE) |
| 74 | +# check package |
| 75 | +cmd <- sprintf(paste("%s CMD check --as-cran", pkg.name), file.path(R.home("bin"), "R")) |
| 76 | +system(cmd, intern=TRUE) |
| 77 | +# build package |
| 78 | +cmd <- sprintf(paste("%s CMD build --resave-data", pkg.name), file.path(R.home("bin"), "R")) |
| 79 | +system(cmd, intern=TRUE) |
| 80 | +# installation |
| 81 | +setwd(here::here()) |
| 82 | +cmd <- paste("R CMD INSTALL --html", pkg.name, "--resave-data") |
| 83 | +tryCatch(system(cmd), finally=setwd(path)) |
| 84 | +# load package |
| 85 | +library(pkg.name, character.only=TRUE) |
| 86 | +?PlotParUnc |
0 commit comments