I have a "Large list" of 831 elements and I'd like to turn each individual element into matrix form without disturbing the structure of the list. However I can only get the first element to be converted, any help would be greatly appreciated - I'm a noob when it comes to anything like this thanks!
list_to_matrix <- function(data) {
for (i in 1:length(data)) {
data[[i]] <- as.matrix(data[[i]])
return(data[[i]])
}
}