Description Usage Arguments Details Value Author(s) See Also Examples
link[base]{scale}
s the spectra matrix. scale (x, scale = FALSE)
centers the data.
1 2 |
x |
the |
center |
if |
scale |
if |
Package scale
provides a fast alternative for base::scale
the centered & scaled hyperSpec
object
C. Beleites
package scale.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## mean center & variance scale
tmp <- scale (chondro)
plot (tmp, "spcmeansd")
plot (sample (tmp, 5), add = TRUE, col = 2)
## mean center only
tmp <- scale (chondro, scale = FALSE)
plot (tmp, "spcmeansd")
plot (sample (tmp, 5), add = TRUE, col = 2)
## custom center
tmp <- sweep (chondro, 1, mean, `/`)
plot (tmp, "spcmeansd")
tmp <- scale (tmp, center = quantile (tmp, .05), scale = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.