[R] convert variable types when creating data frame from cor.test results

2011-12-28 Thread Keith Larson
lt;- split(WW_Wing_SI, WW_Wing_SI$Individual_ID) # apply cor.test() with extract to each element of the list test <- as.data.frame(t(sapply(wing.list, function(temp) cor.test(temp$Delta13C, temp$FeatherPosition, method="pe

[R] How to create a loop and then extract values from the list generated by cor.test

2011-12-27 Thread Keith Larson
<- WW_Wing_SI_Spring[ which(WW_Wing_SI_Spring$Individual_ID == WW_Wing_Individuals[1]), ] ## Create temp2 dateset with results of pearsons product-moment correlation (for the first individual) temp2 <- cor.test(temp$Delta13C, temp$FeatherPosition, method="pearson") Many Cheers, Keith *

[R] calculating correlation coefficients on repeated measures

2011-12-18 Thread Keith Larson
-21.08, -21.5, -17.42, -13.18, -22.3, -22.2, -22.18, -22.14, -21.55, -20.85, -23.1, -20.75, -20.9)), .Names = c("Individual_ID", "FeatherPosition", "Delta13C"), class = "data.frame", row.names = c("1", "2", "3", "4", "5", &quo

[R] Identifying records with the correct number of repeated measures

2011-12-18 Thread Keith Larson
;, "P8", "P9"), class = "factor"), Delta13C = c(-18.3, -18.53, -19.55, -20.18, -20.96, -21.08, -21.5, -17.42, -13.18, -19.95, -22.3, -22.2, -22.18, -22.14, -21.55, -20.85, -23.1, -20.75, -20.9, -21.61, -22.24)), .Names = c("Individual_ID", "Site_Na