Ian wants to quantify the overlap of flowering time between all pairs of plants in his experiment. This following R script reads his file with the flowering schedule of all 31 plants in his experiment and writes a file called ianPhenPairs.csv that has the flowering schedule of every possible pair combination (one per line). Note that there is a separate record for each plant as a sire and dam.
# script ian.phenology.r
pp <- read.csv("https://echinaceaproject.org/wp-content/uploads/ian.phenology.final.csv")
str(pp)
p <- merge(pp,pp, by = NULL)
str(p)
31^2 == dim(p)[1]
write.csv(p, “ianPhenPairs.csv”, row.names = FALSE)
![Share on Twitter twitter](https://echinaceaproject.org/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Pin it with Pinterest pinterest](https://echinaceaproject.org/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/pinterest.png)
![Share by email mail](https://echinaceaproject.org/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/mail.png)
Leave a Reply