Skip to content

Commit

Permalink
Update model params. Closes #1. Closes #2.
Browse files Browse the repository at this point in the history
  • Loading branch information
brews committed Jan 3, 2019
1 parent e7c2623 commit cfbd1a3
Show file tree
Hide file tree
Showing 8 changed files with 30,017 additions and 30,021 deletions.
16 changes: 7 additions & 9 deletions R/predict.R
Expand Up @@ -31,9 +31,8 @@ quantile.prediction <- function(x, ...) {
#' @param d18osw Numeric or vector of observed seawater d18O (‰ VSMOW).
#' @param foram Optional. String or \code{NULL}. String indicating the foram
#'species/subspecies to infer for hierarchical models. String must be one of
#'"G. bulloides", "G. ruber white", "G. ruber pink", "G. sacculifer",
#'"N. incompta", or "N. pachyderma sinistral". \code{NULL} indicates that a
#'pooled model is desired.
#'"G. bulloides", "G. ruber", "T. sacculifer", "N. incompta", or
#'"N. pachyderma". \code{NULL} indicates that a pooled model is desired.
#' @param seasonal_seatemp Optional boolean indicating whether to use the seasonal
#'sea-surface temperature calibrations. Default is \code{FALSE}, i.e. using
#'annual SST calibrations.
Expand All @@ -59,13 +58,13 @@ quantile.prediction <- function(x, ...) {
#' @seealso \code{\link{predict_seatemp}}, \code{\link{predictplot}}
#'
#' @examples
#' # Infer d18Oc for ruber white core top sample using annual hierarchical model.
#' # Infer d18Oc for a G. bulloides core top sample using annual hierarchical model.
#' # The true, d18Oc for this sample is -2.16 (‰ VPDB).
#' delo_ann <- predict_d18oc(seatemp=28.6, d18osw=0.48, foram="G. ruber white")
#' delo_ann <- predict_d18oc(seatemp=28.6, d18osw=0.48, foram="G. bulloides")
#' head(quantile(delo_ann, probs=c(0.159, 0.5, 0.841))) # ± 1 standard deviation
#'
#' # Now using seasonal hierarchical model:
#' delo_sea <- predict_d18oc(seatemp=28.6, d18osw=0.48, foram="G. ruber white",
#' delo_sea <- predict_d18oc(seatemp=28.6, d18osw=0.48, foram="G. bulloides",
#' seasonal_seatemp = TRUE)
#' head(quantile(delo_sea, probs=c(0.159, 0.5, 0.841))) # ± 1 standard deviation
#'
Expand Down Expand Up @@ -104,9 +103,8 @@ predict_d18oc <- function(seatemp, d18osw, foram=NULL, seasonal_seatemp=FALSE,
#'temperature (°C).
#' @param foram Optional. String or \code{NULL}. String indicating the foram
#'species/subspecies to infer for hierarchical models. String must be one of
#'"G. bulloides", "G. ruber white", "G. ruber pink", "G. sacculifer",
#'"N. incompta", or "N. pachyderma sinistral". \code{NULL} indicates that a
#'pooled model is desired.
#'"G. bulloides", "G. ruber", "T. sacculifer", "N. incompta", or
#'"N. pachyderma". \code{NULL} indicates that a pooled model is desired.
#' @param seasonal_seatemp Optional boolean indicating whether to use the seasonal
#'sea-surface temperature calibrations. Default is \code{FALSE}, i.e. using
#'annual SST calibrations.
Expand Down
Binary file modified R/sysdata.rda
Binary file not shown.
20,002 changes: 10,001 additions & 10,001 deletions data-raw/annual_hierarchical_trace.csv

Large diffs are not rendered by default.

20,000 changes: 10,000 additions & 10,000 deletions data-raw/annual_pooled_trace.csv

Large diffs are not rendered by default.

20,002 changes: 10,001 additions & 10,001 deletions data-raw/seasonal_hierarchical_trace.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data-raw/traces.R
Expand Up @@ -5,7 +5,7 @@ require("devtools")
traces <- list()
trace_files <- Sys.glob("*_trace.csv")
for (fl in trace_files) {
basename <- unlist(strsplit(fl, '_trace'))[1]
basename <- unlist(strsplit(fl, "_trace"))[1]
df <- read.csv(fl, check.names = FALSE)
traces[[basename]] <- df
}
Expand Down
11 changes: 5 additions & 6 deletions man/predict_d18oc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions man/predict_seatemp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cfbd1a3

Please sign in to comment.