My code is nut running as expected in Kaggle's notebook. It works fine in Rstudio. I have a list, it consists of 12 csv files brought in via read.csv. I use a for loop on the list and apply complete.cases to each member of the list. When I try to run this code on kaggle I get an error.
Apparently kaggle doesn't like the shorthand. I did a mock up to try to figure it out and noticed something strange. Here is the code:
a<-10:15
b<-1:6
Moe<-cbind(a,b)
Larry<-cbind(a,b)
Curly<-cbind(a,b)
df_list<-list(Moe,Larry,Curly)
When I run df_list I expect to see a list of the dataframes, Moe, Larry & Curly. What I see is the entire contents of each of those dataframes.
I know the sample code doesn't have Moe, larry and Curly as dataframes here, but I tried it with as.dataframe and the results were the same. I would think to reference the name of the dataframe i could use [] and for the data [[]]. I've tried running:
ldf_no_null= for(i in ldf){complete.cases(i)}
But this generates a null value. I assume because it is being applied to the list of names and not the data connected to them. Can someone explain what might be going on here?