if (FALSE) {
library(agridat)
data(yang.barley)
dat <- yang.barley
libs(reshape2)
dat <- acast(dat, gen~site, value.var='yield')
## For bootstrapping of a biplot, see the non-cran packages:
## 'bbplot' and 'distfree.cr'
## https://statgen.ualberta.ca/index.html?open=software.html
## install.packages("https://statgen.ualberta.ca/download/software/bbplot_1.0.zip")
## install.packages("https://statgen.ualberta.ca/download/software/distfree.cr_1.5.zip")
## libs(SDMTools)
## libs(distfree.cr)
## libs(bbplot)
## d1 <- bbplot.boot(dat, nsample=2000) # bootstrap the data
## plot(d1) # plot distributions of principal components
## b1 <- bbplot(d1) # create data structures for the biplot
## plot(b1) # create the confidence regions on the biplot
}
Run the code above in your browser using DataLab