# fdata.methods: fdata S3 Group Generic Functions In fda.usc: Functional Data Analysis and Utilities for Statistical Computing

 fdata.methods R Documentation

## fdata S3 Group Generic Functions

### Description

fdata Group generic methods defined for four specified groups of functions, Math, Ops, Summary and Complex.

order.fdata and split.fdata: A wrapper for the order and split function for fdata object.

### Usage

```## S3 method for class 'fdata'
Math(x, ...)

## S3 method for class 'fdata'
Ops(e1, e2 = NULL)

## S3 method for class 'fdata'
Summary(..., na.rm = FALSE)

## S3 method for class 'fdata'
split(x, f, drop = FALSE, ...)

order.fdata(y, fdataobj, na.last = TRUE, decreasing = FALSE)

is.fdata(fdataobj)
```

### Arguments

 `x` An `fdata` object containing values to be divided into groups or an `list` of `fdata` objects containing values to be combine by rows in a to be flatten one `fdata` object. `...` Further arguments passed to methods. `e1, e2` `fdata` class object `na.rm` `logical`: should missing values be removed? `f` a factor in the sense that as.factor(f) defines the grouping, or a list of such factors in which case their interaction is used for the grouping. `drop` `logical` indicating if levels that do not occur should be dropped (if f is a factor or a list). `y` A sequence of numeric, complex, character or logical vectors, all of the same length, or a classed R object. `fdataobj` `fdata` class object. `na.last` for controlling the treatment of NAs. If TRUE, missing values in the data are put last; if FALSE, they are put first; if NA, they are removed; if "keep" they are kept with rank NA. `decreasing` `logical` Should the sort order be increasing or decreasing?.

### Details

In `order.fdata` the funcional data is ordered w.r.t the sample order of the values of vector.

`split.fdata` divides the data in the fdata object `x` into the groups defined by `f`.

### Value

• split.fdata: The value returned from `split` is a list of fdata objects containing the values for the groups. The components of the list are named by the levels of f (after converting to a factor, or if already a factor and drop = TRUE, dropping unused levels).\

• order.fdata: returns the functional data `fdataobj` w.r.t. a permutation which rearranges its first argument into ascending or descending order.

### Author(s)

Manuel Febrero Bande and Manuel Oviedo de la Fuente manuel.oviedo@udc.es

See Summary and Complex.

### Examples

```## Not run:
data(tecator)
absor<-tecator\$absorp.fdata
absor2<-fdata.deriv(absor,1)
absor<-absor2[1:5,1:4]
absor2<-absor2[1:5,1:4]
sum(absor)
round(absor,4)
log1<-log(absor)

fdataobj<-fdata(MontrealTemp)
fac<-factor(c(rep(1,len=17),rep(2,len=17)))
a1<-split(fdataobj,fac)
dim(a1[]);dim(a1[])

## End(Not run)

```

fda.usc documentation built on Oct. 17, 2022, 9:06 a.m.