R/data_to_lists.R
lists_to_data.Rd
Take lists and convert them to data frame
lists_to_data(Y, X)
list of response vectors
list of predictor matrices
A data frame with all the X variables, as well as the Y variable and a new column identifying the class.
p = 7 k = 2 n = 20 beta = c(1,2) set.seed(1) X = list(matrix(rnorm(p*n), ncol = p), matrix(rnorm(p*n), ncol = p)) Y = list(rnorm(n), rnorm(n)) df = lists_to_data(Y, X) lst = data_to_lists(df)