knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "90%", out.height = "90%", fig.retina = 2 )
Testing and experimenting.
The specProc
package performs a wide range of preprocessing tasks essential for spectroscopic data analysis. Spectral preprocessing is essential in ensuring accurate and reliable results by minimizing the impact of various distortions and artifacts that can arise during data acquisition or due to inherent characteristics of the sample or instrument.
Some techniques are purely based on mathematical concepts, relying on robust statistics and signal processing techniques. Other methods are inspired by the physicochemical context of the dataset. These techniques rely on domain knowledge and exploit the fundamental principles governing the spectroscopic phenomenon used.
You can install the development version from GitHub with:
install.packages("devtools") devtools::install_github("ChristianGoueguel/specProc")
options(mc_doScale_quiet=TRUE)
set.seed(02301) tbl <- data.frame( normal = stats::rnorm(100), skewed = stats::rgamma(100, shape = 2, scale = 1), heavy_tailed = stats::rcauchy(100, location = 0, scale = 1) )
ggplot2::ggplot(tbl) + ggplot2::geom_density(ggplot2::aes(x = normal, fill = "Normal"), linewidth = 0.1, adjust = 2L, alpha = 1/5) + ggplot2::geom_density(ggplot2::aes(x = skewed, fill = "Skewed"), linetype = "dashed", linewidth = 0.1, adjust = 2L, alpha = 1/5) + ggplot2::geom_density(ggplot2::aes(x = heavy_tailed, fill = "Heavy-tailed"), linetype = "dotted", linewidth = 0.1, adjust = 2L, alpha = 1/5) + ggplot2::scale_fill_manual(values = c("Normal" = "#112446", "Skewed" = "red", "Heavy-tailed" = "blue")) + ggplot2::xlim(-10,10) + ggplot2::labs(x = "x", fill = "Distribution") + ggplot2::theme_light() + ggplot2::theme(legend.position = "right", panel.grid = ggplot2::element_blank())
specProc::summaryStats(tbl)
specProc::summaryStats(tbl, robust = TRUE)
specProc::adjusted_boxplot(tbl, xlabels.angle = 0) + ggplot2::geom_hline(yintercept = 0, linetype = "dashed", linewidth = 0.1) + ggplot2::coord_flip()
specProc::generalized_boxplot(tbl, xlabels.angle = 0) + ggplot2::geom_hline(yintercept = 0, linetype = "dashed", linewidth = 0.1) + ggplot2::coord_flip()
data("glass", package = "chemometrics") glass <- tibble::as_tibble(glass)
glass |> specProc::correlation(Na2O, method = "spearman", .plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.