<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div>Ao rodar esta rotina:</div><div>#############################################</div><div>## Test gpData object and regress</div><div>##</div><div>##</div><div>## author : Hans-Juergen Auinger</div><div>## date : 2011 - 11 - 30</div><div>##</div><div>##############################################</div><div><br></div><div># number of locations</div><div>nLoc <- 3</div><div># number of genotypes</div><div>nEntry <- 10</div><div># number of replications</div><div>nRep <- 2</div><div># phenotypic residuals</div><div>pheno <- data.frame(ID = rep(1:nEntry, nRep*nLoc),</div><div> Trait1 = rnorm(nRep*nLoc*nEntry, sd=3),</div><div> Trait2 =
rnorm(nRep*nLoc*nEntry)*2,</div><div> Trait3 = rnorm(nRep*nLoc*nEntry, sd=5),</div><div> loc = rep(1:nLoc, each=nRep*nEntry),</div><div> wdh = rep(rep(1:nRep, each=nEntry), nLoc))</div><div>head(pheno)</div><div># individual values</div><div>IDvals <- matrix(c(rnorm(nEntry, sd=1),rnorm(nEntry, sd=2),rnorm(nEntry, sd=4)), ncol=3, byrow=FALSE)</div><div>head(IDvals)</div><div># location values</div><div>locVals <- matrix(c(rnorm(nLoc, sd=3), rnorm(nLoc, sd=2), rnorm(nLoc, sd=4)), ncol=3, byrow=FALSE)</div><div># replication values</div><div>repVals <-matrix(c(rnorm(nLoc*nRep, sd=5), rnorm(nLoc*nRep, sd=5), rnorm(nLoc*nRep, sd=4)), ncol=3, byrow=FALSE)</div><div># sums</div><div>Trait1 <- locVals[pheno$loc, 1] + rep(repVals[, 1],
each=nEntry) + IDvals[pheno$ID, 1]</div><div>Trait2 <- locVals[pheno$loc, 2] + rep(repVals[, 2], each=nEntry) + IDvals[pheno$ID, 2]</div><div>Trait3 <- locVals[pheno$loc, 3] + rep(repVals[, 3], each=nEntry) + IDvals[pheno$ID, 3]</div><div>pheno$Trait1 <- pheno$Trait1 + Trait1</div><div>pheno$Trait2 <- pheno$Trait2 + Trait2</div><div>pheno$Trait3 <- pheno$Trait3 + Trait3</div><div>pheno$Trait1 <- pheno$Trait1 + ceiling(abs(min(pheno$Trait1))) + 5</div><div>pheno$Trait2 <- pheno$Trait2 + ceiling(abs(min(pheno$Trait2))) + 2</div><div>pheno$Trait3 <- pheno$Trait3 + ceiling(abs(min(pheno$Trait3))) + 10</div><div># genotypic values</div><div>geno <- matrix(sample(c(0:2), 15*nEntry, replace=TRUE), nrow=nEntry, ncol=15)</div><div>rownames(geno) <- 1:nEntry</div><div>colnames(geno) <- paste("M", 1:15, sep="")</div><div># map infomation</div><div>map <- data.frame(row.names = paste("M", 1:15, sep=""), chr = c(rep(1:2, each=6),
2, 2, 2), pos=c((1:6)*30-30, (1:9)*25-25))</div><div>head(map)</div><div># create a gpData object</div><div>gpTest <- create.gpData(pheno=pheno, geno=geno, map=map, repeated = c("loc", "wdh"), modCovar = c("loc", "wdh"))</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="background-color: transparent;">O seguinte erro aparece : </div><div style="background-color: transparent;"><span style="background-color: transparent;">> gpTest <- create.gpData(pheno=pheno, geno=geno, map=map, repeated = c("loc", "wdh"), modCovar = c("loc", "wdh"))</span></div><div style="background-color: transparent;">Error: could not find function "create.gpData"</div><div style="background-color: transparent;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0);
font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;">Alguém poderia me ajudar ???</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;">Desde já agradeço.</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
sans-serif; font-style: normal;">Att,</div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;"><br></div><div style="background-color: transparent; color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-style: normal;">Giselle</div><div><br></div></div></body></html>