Learn R Programming

tuckerR.mmgg (version 1.5.1)

matrition: Concatenate data frame in array and matrix by cases, variables and environments

Description

Concatenate data frame in array and matrix by cases, variables and environments to performs three mode principal components with the function tucker2R.

Usage

matrition(datos, I, J, K)

Arguments

datos

original data from data frames

I

the numbers of cases

J

the numbers of variables

K

the numbers of environment or conditions

Value

matrizlista return a list with: the array "m" with all the data concatenate in array. X1 the data is concatenate by cases, X2 the data concatenate by variables and X3 the data concatenate by environments.

Details

This process is also knowing as 'matricizing' or 'unfolding'.

Examples

Run this code
# NOT RUN {
data(maize_pop,package = "tuckerR.mmgg")
conc_matrix <- matrition(maize_pop,I=30,J=10,K=2)
conc_matrix$m  #get m array
conc_matrix$X1 #get matrix by cases
conc_matrix$X2 #get matrix by variables
conc_matrix$X3 #get matrix by environments
# }

Run the code above in your browser using DataLab