generated from r-hyperspec/pkg-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chondro.R
40 lines (40 loc) · 1.4 KB
/
chondro.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#' Raman spectra of 2 Chondrocytes in Cartilage
#'
#' A Raman-map (laterally resolved Raman spectra) of chondrocytes in cartilage.
#'
#' See the vignette `vignette("chondro", package = "hyperSpec")`.
#'
#' @name chondro
#' @docType data
#' @format The data set has 875 Raman spectra measured on a 25 \eqn{\times}{x}
#' 35 grid with 1 micron step size. Spatial information is in
#' `chondro$x` and `chondro$y`. Each spectrum has 300 data points
#' in the range of ca. 600 - 1800 cm\eqn{^{-1}}{^-1}.
#' @author A. Bonifacio and C. Beleites
#' @keywords datasets
#' @concept datasets
#' @references The raw data is available at <http://hyperspec.r-forge.r-project.org/blob/chondro.zip>
#' @examples
#' chondro
#'
#' ## do baseline correction
#' baselines <- spc_fit_poly_below(chondro)
#' chondro <- chondro - baselines
#'
#' ## area normalization
#' chondro <- chondro / colMeans(chondro)
#'
#' ## substact common composition
#' chondro <- chondro - quantile(chondro, 0.05)
#'
#' cols <- c("dark blue", "orange", "#C02020")
#' plotmap(chondro, clusters ~ x * y, col.regions = cols)
#'
#' cluster.means <- aggregate(chondro, chondro$clusters, mean_pm_sd)
#' plot(cluster.means, stacked = ".aggregate", fill = ".aggregate", col = cols)
#'
#' ## plot nucleic acid bands
#' plotmap(chondro[, , c(728, 782, 1098, 1240, 1482, 1577)],
#' col.regions = colorRampPalette(c("white", "gold", "dark green"), space = "Lab")(20)
#' )
NULL