Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

CreateBasis

Create an orthogonal basis of K functions in [0, 1], with nGrid points.


Description

Create an orthogonal basis of K functions in [0, 1], with nGrid points.

Usage

CreateBasis(
  K,
  pts = seq(0, 1, length.out = 50),
  type = c("cos", "sin", "fourier", "legendre01", "poly")
)

Arguments

K

A positive integer specifying the number of eigenfunctions to generate.

pts

A vector specifying the time points to evaluate the basis functions.

type

A string for the type of orthogonal basis.

Value

A K by nGrid matrix, each column containing an basis function.

Examples

basis <- CreateBasis(3, type='fourier')
head(basis)

fdapace

Functional Data Analysis and Empirical Dynamics

v0.5.6
BSD_3_clause + file LICENSE
Authors
Cody Carroll [aut, cre] (<https://orcid.org/0000-0003-3525-8653>), Alvaro Gajardo [aut], Yaqing Chen [aut], Xiongtao Dai [aut], Jianing Fan [aut], Pantelis Z. Hadjipantelis [aut], Kyunghee Han [aut], Hao Ji [aut], Shu-Chin Lin [ctb], Paromita Dubey [ctb], Hans-Georg Mueller [cph, ths, aut], Jane-Ling Wang [cph, ths, aut]
Initial release
2021-01-10,

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.