rbind_mfd: Bind replications of two Multivariate Functional Data Objects

Description Usage Arguments Value Examples

View source: R/00_mfd.R

Description

Bind replications of two Multivariate Functional Data Objects

Usage

1
rbind_mfd(mfdobj1, mfdobj2)

Arguments

mfdobj1

An object of class mfd, with the same variables of mfdobj2 and different replication names with respect to mfdobj2.

mfdobj2

An object of class mfd, with the same variables of mfdobj1, and different replication names with respect to mfdobj1.

Value

An object of class mfd, whose variables are the same of mfdobj1 and mfdobj2 and whose replications are the union of the replications in mfdobj1 and mfdobj2.

Examples

1
2
3
4
5
6
7
8
library(funcharts)
mfdobj1 <- data_sim_mfd(nvar = 3, seed = 1, nobs = 4)
mfdobj2 <- data_sim_mfd(nvar = 3, seed = 2, nobs = 5)
dimnames(mfdobj2$coefs)[[2]] <-
  mfdobj2$fdnames[[2]] <-
  c("rep11", "rep12", "rep13", "rep14", "rep15")
mfdobj_rbind <- rbind_mfd(mfdobj1, mfdobj2)
plot_mfd(mfdobj_rbind)

funcharts documentation built on March 15, 2021, 5:07 p.m.