How do I calculate correlations between one column and all other columns in a data frame in R without using column names? I tried to use ddply and it works if I use just two col
Maybe like this? It produces a correlation matrix for each species.
by(iris[,1:4], iris$Species, cor)