split | R Documentation |
split
divides the hyperSpec
object into a list of
hyperSpec
objects according to the groups given by f
.The hyperSpec
objects in the list may be bound together again by
bind ("r", list_of_hyperSpec_objects)
.
## S4 method for signature 'hyperSpec'
split(x, f, drop = TRUE)
x |
the |
f |
a factor giving the grouping (or a variable that can be converted
into a factor by |
drop |
if |
A list of hyperSpec
objects.
C. Beleites
split
dist <- pearson.dist (chondro[[]])
dend <- hclust (dist, method = "ward")
z <- cutree (dend, h = 0.15)
clusters <- split (chondro, z)
length (clusters)
# difference in cluster mean spectra
plot (apply (clusters[[2]], 2, mean) - apply (clusters[[1]], 2, mean))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.