Re: [R] calculating correlation coefficients on repeated measures

2011-12-19 Thread Sarah Goslee
Hi Keith, You do need to reorganize your data. cor() will work on any number of variables as long as they are columns in a matrix or data frame. There are a lot of ways to reorganize data, of various power and complexity. Here's one simple way: > library(ecodist) > WW_Sample_table <- with(WW_Sam

[R] calculating correlation coefficients on repeated measures

2011-12-18 Thread Keith Larson
Dear list, I have 9 repeated measures (measurement variable == 'Delta13C') for individuals (ID variable == 'Individual_ID'. Each repeated measure is "indexed" (right term?) by the variable 'FeatherPosition' and given as c('P1', 'P2', 'P3', 'P4', 'P5', 'P6', 'P7', 'P8', 'P9'). I would like to calc