Displaying 1 result from an estimated 1 matches for "all_dfs".
Did you mean:
all_dat
2013 Jun 11
1
mapply on multiple data frames
...ta frames. All data frames have the same structure.
Here is my code so far:
f<-function(x,y) {
test<-t.test(x$col1[x$col3=="num",],v$col2[x$col3=="num",],paired=T,alternative="greater")
out<-test$p.value
return(out)
}
all_nums<-list(num1,num2,num3,num4)
all_dfs<-list(df1,df2,df3,df4)
mapply(f,all_dfs,all_nums)
This tells me that $ operator is invalid for atomic vectors. I have tried shifting to notation using [ ,] to denote columns, but that gives me this error: incorrect number of dimensions.
Thank you in advance,
Elizabeth