Applying function (ks.test) between two data frames colum-wise in R
问题 My simple question is: How do you do a ks.test between two data frames column by column? Eg. We have two data frames: D1 <- data.frame(D$Ag, D$Al, D$As, D$Ba, D$Be, D$Ca, D$Cd, D$Co, D$Cu, D$Cr) D2 <- data.frame(S$Ag, S$Al, S$As, S$Ba, S$Be, S$Ca, S$Cd, S$Co, S$Cu, S$Cr) Note: this is just an example - real case would include much more columns and they contain concentrations of a certain element in a specific location. Now i would like to run a ks.test between the two data frames : ks.test(D