cbind_mfd: Bind variables of two Multivariate Functional Data Objects

Description Usage Arguments Value Examples

View source: R/00_mfd.R

Description

Bind variables of two Multivariate Functional Data Objects

Usage

1
cbind_mfd(mfdobj1, mfdobj2)

Arguments

mfdobj1

An object of class mfd, with the same number of replications of mfdobj2 and different variable names with respect to mfdobj2.

mfdobj2

An object of class mfd, with the same number of replications of mfdobj1, and different variable names with respect to mfdobj1.

Value

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

Examples

1
2
3
4
5
6
7
8
9
library(funcharts)
mfdobj1 <- data_sim_mfd(nvar = 3, seed = 1)
mfdobj2 <- data_sim_mfd(nvar = 2, seed = 2)
dimnames(mfdobj2$coefs)[[3]] <- mfdobj2$fdnames[[3]] <- c("var10", "var11")

plot_mfd(mfdobj1)
plot_mfd(mfdobj2)
mfdobj_cbind <- cbind_mfd(mfdobj1, mfdobj2)
plot_mfd(mfdobj_cbind)

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