Skip to content

R package for fitting Optical Stimulated Luminescence (OSL) models using Stan.

License

Notifications You must be signed in to change notification settings

zaandahl/rstanosl

Repository files navigation

rstanosl Hex Sticker

rstanosl

rstanosl is an R package for fitting Optical Stimulated Luminescence (OSL) models using Stan.

Installation

You can install the development version of rstanosl from GitHub with:

devtools::install_github("zaandahl/rstanosl")

If you want you can also install the package with a vignette. You need to install bayesplot prior to building the vignette. This will take a few minutes to create:

devtools::install_github("zaandahl/rstanosl", build_vignettes = TRUE)

Getting Started

Load the package:

library(rstanosl)

Load the example data:

library(rstanosl)

Fit a ALMM model to a single depth layer of the data:

osl_data_46 <- osl_data %>% filter(Depth == 46)
almm_fit <- almm(osl_data_46, logged = T, sigma = NULL, refresh = 0)

Further Resources

Building this package with devtools README and vignette

You can build this package from a Docker container that runs RStudio Server with the following commands:

docker compose build
docker compose up

Then, open a web browser and navigate to http://localhost:8787. Log in with username rstudio and password rstudio. Then, run the following commands in the RStudio console:

setwd("./package")
source("inst/logo/logo.R")
knitr::knit("README.Rmd", "README.md")
devtools::document()
devtools::build()
devtools::install(build_vignettes = TRUE)

After you have finished building the package you can load in RStudio and save it as a tarball:

library(rstanosl)
save.image()

Then, you can exit the Docker container by pressing Ctrl+C in the terminal window where you ran docker compose up. Finally, you can remove the Docker container with the following command:

docker compose down

License

BSD-3-Clause License (see LICENSE file)

About

R package for fitting Optical Stimulated Luminescence (OSL) models using Stan.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published