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
# Pull docker image (includes RStudio server) | |
FROM rocker/rstudio:3.6.0 | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
libz-dev \ | |
libxml2-dev | |
ENV RENV_VERSION 0.7.0-111 | |
RUN R -e "install.packages('remotes', repos = c(CRAN = 'https://cloud.r-project.org'))" |
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
pkgs <- c("mlbench", "Cubist") | |
lapply(pkgs, library, character.only = TRUE) | |
# Example data set | |
data(BostonHousing) | |
# Test with only 2 factorial predictors | |
boston_housing <- BostonHousing[, c("crim", "zn", "medv")] | |
# Convert numeric `crim` and `zn` to factors | |
boston_housing$zn <- as.factor(boston_housing$zn) | |
boston_housing$crim <- as.factor(boston_housing$crim) |
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
################################################################################ | |
## Task: Select reference samples for soil refence analyses by using | |
## Kennard-Stones | |
## sampling algorithm on preprocessed spectra in PCA space | |
################################################################################ | |
# Load packages | |
library("tidyverse") | |
library("simplerspec") |
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
################################################################################ | |
## Task: Example script to predict spectra in simplerspec framework | |
################################################################################ | |
# Remove all R objects from memory | |
rm(list = ls()) | |
# Load packages | |
pkgs <- c("tidyverse", "simplerspec") | |
lapply(pkgs, library, character.only = TRUE) |
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
################################################################################ | |
## Task: Example script to visualize spectra in simplerspec framework | |
################################################################################ | |
# Remove all R objects from memory | |
rm(list = ls()) | |
# Load packages | |
pkgs <- c("tidyverse", "simplerspec") | |
lapply(pkgs, library, character.only = TRUE) |
NewerOlder