Description Usage Arguments Details Examples
View source: R/apply-generic.R
Applies a function to the curves function values (y-values) in an
fdsample
object, for each argument value (x-value).
1 | apply.fdsample(x, fun = mean, ..., fopt = list())
|
x |
object of type |
fun |
the function to apply, defaults to the mean |
... |
optional, (plot) options for updating |
fopt |
list of options to |
The function fun
should return a single number or a vector of
fixed length. This is not checked.
1 2 3 4 5 6 7 8 9 10 11 | data(exampledata)
# look at data set fuda
str(fuda)
# apply the summary function contained in fuda$options
str(apply.fdsample(fuda))
# apply the median
str(apply.fdsample(fuda, "median"))
# apply median and change axis label
str(apply.fdsample(fuda, median, xlab = "median of y-values"))
# another way to get the median and change axis label
str(apply.fdsample(fuda, quantile, list(prob = 0.5), xlab = "50% quantile of y-values"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.