if (FALSE) {
library(fda.usc)
data(phoneme)
# 1. convert a fdata object that contains multiple classes.
# labels are defined for each curve
converted = dataf(phoneme$learn, phoneme$classlearn)
plot.functional(converted)
# 2. convert multiple fdata objects, each of which contains one class
# the same label is applied to all curves of each fdata object
converted = dataf(list(phoneme$learn, phoneme$test), c("1 red", "2 blue"))
converted$name = "Phoneme learn (red) and test (blue)"
plot.functional(converted)
}
Run the code above in your browser using DataLab