# S3 Class for univariate functional datasets.

### Description

This function implements a constructor for elements of `S3`

class
`fData`

, aimed at implementing a representation of a functional
dataset.

### Usage

1 |

### Arguments

`grid` |
the evenly spaced grid over which the functional observations are
measured. It must be a numeric vector of length |

`values` |
the values of the observations in the functional dataset,
prodived in form of a 2D data structure (e.g. matrix or array) having as
rows the observations and as columns their measurements over the 1D grid of
length |

### Details

The functional dataset is represented as a collection of measurement of the
observations on an evenly spaced, 1D grid of discrete points (representing,
e.g. time), namely, for functional data defined over a grid *[t_0,
t_1, …, t_{P-1}]*:

* f_{i,j} = f_i( t_0 + j h ), \quad h = \frac{t_P - t_0}{N},
\quad \forall j = 1, …, P, \quad \forall i = 1, …
N.*

### Value

The function returns a `S3`

object of class `fData`

, containing
the following elements:

"

`N`

": the number of elements in the dataset;"

`P`

": the number of points in the 1D grid over which elements are measured;"

`t0`

": the starting point of the 1D grid;"

`tP`

": the ending point of the 1D grid;"

`values`

": the matrix of measurements of the functional observations on the 1D grid provided with`grid`

.

### See Also

`generate_gauss_fdata`

, `sub-.fData`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
# Defining parameters
N = 20
P = 1e2
# One dimensional grid
grid = seq( 0, 1, length.out = P )
# Generating an exponential covariance function (see related help for more
# information )
C = exp_cov_function( grid, alpha = 0.3, beta = 0.4 )
# Generating a synthetic dataset with a gaussian distribution and
# required mean and covariance function:
values = generate_gauss_fdata( N,
centerline = sin( 2 * pi * grid ),
Cov = C )
fD = fData( grid, values )
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.