diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 30ca258..b5dd37a 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -36,6 +36,7 @@ jobs: with: r-version: ${{ matrix.config.r }} extra-repositories: "https://inla.r-inla-download.org/R/testing" + http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - uses: r-lib/actions/setup-r-dependencies@v2 diff --git a/DESCRIPTION b/DESCRIPTION index a40c3e7..c25c5fd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: bremla Type: Package Title: Bayesian Regression Modeling of Layer-Counted Archives -Version: 0.4.0.9000 +Version: 0.1.0.9001 Authors@R: c( person("Eirik", "Myrvoll-Nilsen", email = "eirikmn91@gmail.com", role = c("aut","cre","cph"), @@ -18,7 +18,7 @@ Description: Performs efficient Bayesian regression modeling of layer-counted cl to be constrained using tie-points. The simulated chronologies can also be used to estimate the dating uncertainty of the onsets of climate transitions. Details on the age-depth model in Myrvoll-Nilsen, Riechers, Rypdal and Boers (2022) , and on how to incorporate tie-points - in Myrvoll-Nilsen, Riechers and Boers (preprint) . + in Myrvoll-Nilsen, Riechers and Boers (preprint). License: GPL (>= 2) Imports: numDeriv, @@ -32,7 +32,7 @@ Depends: R (>= 3.6), stats, methods -Additional_repositories: https://inla.inla-r-download.org/R/testing +Additional_repositories: https://inla.r-inla-download.org/R/testing Suggests: INLA (>= 21.08.31), sn, diff --git a/bremla.Rproj b/bremla.Rproj index b9255bc..497f8bf 100644 --- a/bremla.Rproj +++ b/bremla.Rproj @@ -1,20 +1,20 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/man/bremla.Rd b/man/bremla.Rd index 59f4be0..e555d94 100644 --- a/man/bremla.Rd +++ b/man/bremla.Rd @@ -103,24 +103,15 @@ synchronization=list(locations=depth[c(100,400,700)],method="gauss", sd=c(50,20,100) ) ) -control.sim=list(synchronized=2, +control.sim=list(synchronized=TRUE, summary=list(compute=TRUE)) -#simulate transition: -prox = rnorm(n,mean=c(rep(0,400),seq(0,4,length.out=20),rep(4,580)),sd=1)-45 -window = 330:500 -control.linramp = list(label="Simulated",proxy=prox,interval=window,interval.unit="index", - depth.ref=depth[401]) -control.transition_dating=list(label="Simulated transition",dating=list(age.ref=age[401])) - object = bremla(formula,data,nsims=5000,reference.label="simulated timescale", events=events, synchronization=synchronization, control.fit=control.fit, control.sim=control.sim, - control.linramp=control.linramp, - control.transition_dating=control.transition_dating, print.progress=TRUE) summary(object) plot(object) diff --git a/man/bremla_prepare.Rd b/man/bremla_prepare.Rd index 8c8f0a7..74ff4f4 100644 --- a/man/bremla_prepare.Rd +++ b/man/bremla_prepare.Rd @@ -100,20 +100,12 @@ synchronization=list(method="gauss") control.sim=list(synchronized=2, summary=list(compute=TRUE)) -#simulate transition: -prox = rnorm(n,mean=c(rep(0,400),seq(0,4,length.out=20),rep(4,580)),sd=1) -window = 330:500 -control.linramp = list(label="Simulated",proxy=prox,interval=window,interval.unit="index", - depth.ref=depth[401]) -control.transition_dating=list(label="Simulated transition",dating=list(age.ref=age[401])) control.bias=NULL object = bremla_prepare(formula,data,nsims=5000,reference.label="simulated timescale", events = events, synchronization=synchronization, control.fit=control.fit, control.sim=control.sim, - control.linramp=control.linramp, - control.transition_dating=control.transition_dating, control.bias=control.bias) summary(object) } diff --git a/man/events_depth_to_age.Rd b/man/events_depth_to_age.Rd index d3d1093..c330f6c 100644 --- a/man/events_depth_to_age.Rd +++ b/man/events_depth_to_age.Rd @@ -57,7 +57,7 @@ control.sim=list(synchronized=TRUE, summary=list(compute=TRUE)) #simulate transition: -prox = rnorm(n,mean=c(rep(0,400),seq(0,4,length.out=20),rep(4,580)),sd=1) +prox = rnorm(n,mean=c(rep(0,400),seq(0,4,length.out=200),rep(4,400)),sd=1) window = 330:500 control.linramp = list(label="Simulated",proxy=prox,interval=window,interval.unit="index", depth.ref=depth[401]) diff --git a/man/linrampfitter.Rd b/man/linrampfitter.Rd index a53cd87..9221c1d 100644 --- a/man/linrampfitter.Rd +++ b/man/linrampfitter.Rd @@ -58,7 +58,7 @@ control.sim=list(synchronized=TRUE, summary=list(compute=TRUE)) #simulate transition: -prox = rnorm(n,mean=c(rep(0,400),seq(0,4,length.out=20),rep(4,580)),sd=1) +prox = rnorm(n,mean=c(rep(0,400),seq(0,4,length.out=200),rep(4,400)),sd=1) window = 330:500 control.linramp = list(label="Simulated",proxy=prox,interval=window,interval.unit="index", depth.ref=depth[401])