-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
284 changed files
with
23,941 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#-------------------------------------------- | ||
# Building and installation of an R package: | ||
# Matthias Forkel, 2017-08-02 | ||
#-------------------------------------------- | ||
|
||
# package development is based on inlinedocs (for in-line documentation) | ||
library(inlinedocs) | ||
library(here) | ||
|
||
# name and directory of package | ||
pkg.name <- "LPJmLmdi" | ||
path <- paste(here::here(), sep="/") | ||
|
||
|
||
# BUILDING | ||
#--------- | ||
|
||
# Building is only required if you further develop the package, i.e. if you want to newly | ||
# create help files and perform tests. Continue with the next section if you just downloaded | ||
# the package and you want to install it. | ||
|
||
# build package structure and Rd files | ||
setwd(path) | ||
package.skeleton.dx(pkg.name) | ||
|
||
# check package | ||
cmd <- sprintf(paste("%s CMD check --as-cran", pkg.name), file.path(R.home("bin"), "R")) | ||
system(cmd, intern=TRUE) | ||
|
||
# build package | ||
cmd <- sprintf(paste("%s CMD build --resave-data", pkg.name), file.path(R.home("bin"), "R")) | ||
system(cmd, intern=TRUE) | ||
|
||
|
||
# INSTALLATION | ||
#------------- | ||
|
||
# installation | ||
cmd <- paste("R CMD INSTALL --html", pkg.name, "--resave-data") | ||
tryCatch(system(cmd), finally=setwd(path)) | ||
|
||
# load package | ||
library(pkg.name, character.only=TRUE) | ||
|
||
# check package help files: | ||
?OptimizeLPJgenoud | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
install.packages("bfast") | ||
install.packages("phenopix") | ||
here() | ||
setwd("~/shares/home/code/R/_gitlab/") | ||
pkgs <- c("RobinsonMaps") | ||
i <- 1 | ||
setwd(pkgs[i]) | ||
cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") | ||
tryCatch(system(cmd), finally=setwd(path)) | ||
getwd() | ||
pkgs <- c("RobinsonMaps", "ModelDataComp") | ||
setwd("..") | ||
setwd(pkgs[i]) | ||
cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") | ||
tryCatch(system(cmd)) | ||
setwd("..") | ||
getwd() | ||
pkgs <- c("RobinsonMaps", "ModelDataComp") | ||
i <- 2 | ||
setwd(pkgs[i]) | ||
cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") | ||
tryCatch(system(cmd)) | ||
setwd("..") | ||
install.packages("lhs") | ||
setwd("~/shares/home/code/R/_gitlab/") | ||
pkgs <- c("RobinsonMaps", "ModelDataComp") | ||
i <- 2 | ||
setwd(pkgs[i]) | ||
cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") | ||
tryCatch(system(cmd)) | ||
setwd("..") | ||
install.packages("randomForest") | ||
i <- 2 | ||
setwd(pkgs[i]) | ||
cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") | ||
tryCatch(system(cmd)) | ||
setwd("..") | ||
pkgs <- c("RobinsonMaps", "ModelDataComp", "Raster4ML") | ||
i <- 3 | ||
setwd(pkgs[i]) | ||
cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") | ||
tryCatch(system(cmd)) | ||
setwd("..") | ||
install.packages("ICEbox") | ||
install.packages("ff") | ||
setwd("~/shares/home/code/R/greenbrown") | ||
cmd <- paste("R CMD INSTALL --html greenbrown --resave-data") | ||
tryCatch(system(cmd)) | ||
setwd("~/shares/home/code/R/_gitlab/") | ||
pkgs <- c("RobinsonMaps", "ModelDataComp", "Raster4ML") | ||
i <- 3 | ||
setwd(pkgs[i]) | ||
cmd <- paste("R CMD INSTALL --html ", pkgs[i], " --resave-data") | ||
tryCatch(system(cmd)) | ||
setwd("..") | ||
setwd("~/shares/home/code/R/_gitlab-pik/LPJmLmdi/") | ||
tryCatch(system("R CMD INSTALL --html LPJmLmdi --resave-data")) | ||
grep("o", letters) | ||
# package development is based on inlinedocs (for in-line documentation) | ||
library(inlinedocs) | ||
library(here) | ||
# name and directory of package | ||
pkg.name <- "LPJmLmdi" | ||
path <- paste(here::here(), sep="/") | ||
# Building is only required if you further develop the package, i.e. if you want to newly | ||
# create help files and perform tests. Continue with the next section if you just downloaded | ||
# the package and you want to install it. | ||
# build package structure and Rd files | ||
setwd(path) | ||
package.skeleton.dx(pkg.name) | ||
# check package | ||
cmd <- sprintf(paste("%s CMD check --as-cran", pkg.name), file.path(R.home("bin"), "R")) | ||
system(cmd, intern=TRUE) | ||
# check package | ||
cmd <- sprintf(paste("%s CMD check --as-cran", pkg.name), file.path(R.home("bin"), "R")) | ||
system(cmd, intern=TRUE) | ||
# build package | ||
cmd <- sprintf(paste("%s CMD build --resave-data", pkg.name), file.path(R.home("bin"), "R")) | ||
system(cmd, intern=TRUE) | ||
# installation | ||
setwd(here::here()) | ||
cmd <- paste("R CMD INSTALL --html", pkg.name, "--resave-data") | ||
tryCatch(system(cmd), finally=setwd(path)) | ||
# load package | ||
library(pkg.name, character.only=TRUE) | ||
?PlotParUnc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Package: LPJmLmdi | ||
Title: Model-Data Integration for the LPJmL Dynamic Global Vegetation Model | ||
Version: 1.3 | ||
Date: 2019-01-22 | ||
Author: Matthias Forkel <[email protected]> [aut, cre], Markus Drüke <[email protected]> [aut] | ||
Maintainer: Matthias Forkel <[email protected]>, Markus Drüke <[email protected]> | ||
Description: Model-data integration framework for the LPJmL dynamic global vegetation model. Specifically, the package provides functions 1) to optimize LPJmL model parameters using the GENOUD genetic optimization algorithm, 2) to read and write LPJmL input data, and 3) to read LPJmL output files. | ||
Depends: R (>= 2.15.3), raster, plyr, rgenoud, ncdf4, ModelDataComp | ||
Imports: dplyr, plotrix, fields, tidyr | ||
License: GPL-2 | ||
URL: | ||
LazyLoad: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
importFrom("plotrix", "color.legend") | ||
importFrom("tidyr", "separate", "unite", "gather") | ||
importFrom("RColorBrewer", "brewer.pal") | ||
exportPattern("^[[:alpha:]]+") | ||
|
Oops, something went wrong.