I wanted to calculate correlation coeficient between colunms of a subset of a data set x in R I have rows of 40 models each 200 simulations in total 8000 rows I wanted to calculate the corr coeficient between colums for each simulation (40 rows)
cor(x[c(3,5)])
calculates from all 8000 rows
I need cor(x[c(3,5)])
but only when X$nsimul=1
and so on
would you help me in this regards San