Skip to content
Prev 243873 / 398506 Next

creating a list of dataframes

I am iterating through multiple files and storing dataframes in a list. I
want to perform calculations on these dataframes. How would I go about doing
this?
I do:
num_files<- list.files()
list = c()
for(x in num_files)
{
frame = read.table(x)
list = c(list, assign(paste("frame",x),frame))
}

For each row in each data frame I want to calculate the correlation between
the rows. How do I do this?