Basically I am having 20 csv. files and want to convert one of the columns (logF0) in each dataframe into a 20*16 matrix. The result should be 20 matrixs of dimention 20*16 and I hope the names of the matrix could be the same as the csv. files. I thought I could use a loop to convert the dataframe separately to matrix at first:
files_list<-list.files("my_path", full.names = TRUE, pattern = "*.csv")
for(i in 1: length(files_list))
{dat<-data.frame()
mat<-matrix()
file[i]<-rbind(dat, read.csv(files_list[i]))
mat[i]<-rbind(mat, matrix(file[i]$logF0, nrow=20, byrow = F))}
The above code doesn't work. Kindly provide a solution for that...