wheatfix <- dotna( read.table( "wheatfix.dat", header =T ) ) wheatfix$ci <- qt( 0.975, wheatfix$ddf ) * wheatfix$stderr wheatfix.means <- nested.means(wheatfix,c("ploidy","species"), carry=c("estimate","stderr","ddf","ci")) wheatran <- dotna( read.table( "wheatran.dat", header =T ) ) wheatran$ci <- qt( 0.975, wheatran$ddf ) * wheatran$stderr wheatran.means <- nested.means(wheatran,c("cross","access"), carry=c("estimate","stderr","ddf","ci")) wheatran.means$cross$cross <- codes(wheatran.means$cross$cross) wheatran.means$access$cross <- codes(wheatran.means$access$cross) wheatran.means$access$access <- wheatran.means$access$cross #wheatfix.mean <- wheatfix[ wheatfix$parameter == "mean", c("estimate","ci") ] #wheatfix.ploidy <- wheatfix[ wheatfix$parameter == "PLOIDY", # c("ploidy","estimate","ci") ] #row.names( wheatfix.ploidy ) <- wheatfix.ploidy$ploidy #wheatfix.species <- wheatfix[ wheatfix$parameter == "SPECIES(PLOIDY)", # c("species","ploidy","estimate","ci") ] #row.names( wheatfix.species ) <- wheatfix.species$species # #wheatran.mean <- wheatran[ 1, c("estimate","ci") ] #row.names( wheatran.mean ) <- wheatran$parameter[1] #wheatran.cross <- wheatran[ wheatran$parameter == "cross", # c("cross","estimate","ci") ] #row.names( wheatran.cross ) <- wheatran.cross$cross #wheatran.access <- wheatran[ wheatran$parameter == "access", # c("access","cross","estimate","ci") ] #row.names( wheatran.access ) <- interaction( wheatran.access$cross, # wheatran.access$access) # ##################################################################### # ##wheat <- dotna( read.table("wheat.dat", header=T ) ) ##wheat$accession <- factor(interaction(wheat[,c("cross","accession")],drop=T)) ##wheat$ploidy <- factor(wheat$ploidy) ##wheat$species <- factor(wheat$species) ##wheat$cross <- factor(wheat$cross) ##wheat$accession <- factor(wheat$accession) ## ##wheat <- wheat[!is.na(wheat$tr1),] ##wheata <- projwt( wheat, "accession", ave=c("tr1","tr2","tr3") ) ##wheata$plant <- NULL ## ##wheatc <- projwt( wheat, "cross", ave=c("tr1","tr2","tr3") ) ##wheatc$plant <- NULL ##wheatc$accession <- NULL ##wheatfix.fit <- aov( tr1 ~ ploidy + species/ploidy, wheatc) ## ###wheata.fit1 <- aov( tr1 ~ ploidy + species/ploidy + ### Error( cross/ploidy*species ), wheata) ## ###wheat.fit1 <- aov(tr1~ploidy+species/ploidy+ ### Error(cross/ploidy*species+accession/cross*ploidy*species), wheat) #