This utility function manipulates a mfData
object in order to extract
from the list of its fData
objects ( namely, mfData$fDList
)
the measurement values of each component and stores them into a list.
toListOfValues(mfData)
the multivariate functional dataset in form of mfData
object.
The function returns the list of values of each fData
object
representing the components of mfData
.
Given a mfData
of L
components, the function is equivalent to
list( mfData$fDList[[ 1 ]]$values,
...,
mfData$fDList[[ L ]]$values )
.
grid = seq( 0, 1, length.out = 5 )
D_1 = matrix( 1 : 5, nrow = 10, ncol = 5, byrow = TRUE )
D_2 = 2 * D_1
D_3 = 3 * D_1
mfD = mfData( grid, list( D_1, D_2, D_3 ) )
mfD
#> $N
#> [1] 10
#>
#> $L
#> [1] 3
#>
#> $P
#> [1] 5
#>
#> $t0
#> [1] 0
#>
#> $tP
#> [1] 1
#>
#> $fDList
#> $fDList[[1]]
#> $t0
#> [1] 0
#>
#> $tP
#> [1] 1
#>
#> $h
#> [1] 0.25
#>
#> $P
#> [1] 5
#>
#> $N
#> [1] 10
#>
#> $values
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 1 2 3 4 5
#> [2,] 1 2 3 4 5
#> [3,] 1 2 3 4 5
#> [4,] 1 2 3 4 5
#> [5,] 1 2 3 4 5
#> [6,] 1 2 3 4 5
#> [7,] 1 2 3 4 5
#> [8,] 1 2 3 4 5
#> [9,] 1 2 3 4 5
#> [10,] 1 2 3 4 5
#>
#> attr(,"class")
#> [1] "fData"
#>
#> $fDList[[2]]
#> $t0
#> [1] 0
#>
#> $tP
#> [1] 1
#>
#> $h
#> [1] 0.25
#>
#> $P
#> [1] 5
#>
#> $N
#> [1] 10
#>
#> $values
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 2 4 6 8 10
#> [2,] 2 4 6 8 10
#> [3,] 2 4 6 8 10
#> [4,] 2 4 6 8 10
#> [5,] 2 4 6 8 10
#> [6,] 2 4 6 8 10
#> [7,] 2 4 6 8 10
#> [8,] 2 4 6 8 10
#> [9,] 2 4 6 8 10
#> [10,] 2 4 6 8 10
#>
#> attr(,"class")
#> [1] "fData"
#>
#> $fDList[[3]]
#> $t0
#> [1] 0
#>
#> $tP
#> [1] 1
#>
#> $h
#> [1] 0.25
#>
#> $P
#> [1] 5
#>
#> $N
#> [1] 10
#>
#> $values
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 3 6 9 12 15
#> [2,] 3 6 9 12 15
#> [3,] 3 6 9 12 15
#> [4,] 3 6 9 12 15
#> [5,] 3 6 9 12 15
#> [6,] 3 6 9 12 15
#> [7,] 3 6 9 12 15
#> [8,] 3 6 9 12 15
#> [9,] 3 6 9 12 15
#> [10,] 3 6 9 12 15
#>
#> attr(,"class")
#> [1] "fData"
#>
#>
#> attr(,"class")
#> [1] "mfData"
toListOfValues( mfD )
#> [[1]]
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 1 2 3 4 5
#> [2,] 1 2 3 4 5
#> [3,] 1 2 3 4 5
#> [4,] 1 2 3 4 5
#> [5,] 1 2 3 4 5
#> [6,] 1 2 3 4 5
#> [7,] 1 2 3 4 5
#> [8,] 1 2 3 4 5
#> [9,] 1 2 3 4 5
#> [10,] 1 2 3 4 5
#>
#> [[2]]
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 2 4 6 8 10
#> [2,] 2 4 6 8 10
#> [3,] 2 4 6 8 10
#> [4,] 2 4 6 8 10
#> [5,] 2 4 6 8 10
#> [6,] 2 4 6 8 10
#> [7,] 2 4 6 8 10
#> [8,] 2 4 6 8 10
#> [9,] 2 4 6 8 10
#> [10,] 2 4 6 8 10
#>
#> [[3]]
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 3 6 9 12 15
#> [2,] 3 6 9 12 15
#> [3,] 3 6 9 12 15
#> [4,] 3 6 9 12 15
#> [5,] 3 6 9 12 15
#> [6,] 3 6 9 12 15
#> [7,] 3 6 9 12 15
#> [8,] 3 6 9 12 15
#> [9,] 3 6 9 12 15
#> [10,] 3 6 9 12 15
#>