Já tentou verificar se o pacote gpData está instalado?
Abs
“Do you have the patience to wait until your mud settles, and the water is clear? Can you remain unmoving until the right action arises by itself?" Lao Tzu - Tao Te Ching
Ao rodar esta rotina:############################################### Test gpData object and regress###### author : Hans-Juergen Auinger## date : 2011 - 11 - 30################################################# number of locationsnLoc <- 3# number of genotypesnEntry <- 10# number of replicationsnRep <- 2# phenotypic residualspheno <- data.frame(ID = rep(1:nEntry, nRep*nLoc),Trait1 = rnorm(nRep*nLoc*nEntry, sd=3),Trait2 = rnorm(nRep*nLoc*nEntry)*2,Trait3 = rnorm(nRep*nLoc*nEntry, sd=5),loc = rep(1:nLoc, each=nRep*nEntry),wdh = rep(rep(1:nRep, each=nEntry), nLoc))head(pheno)# individual valuesIDvals <- matrix(c(rnorm(nEntry, sd=1),rnorm(nEntry, sd=2),rnorm(nEntry, sd=4)), ncol=3, byrow=FALSE)head(IDvals)# location valueslocVals <- matrix(c(rnorm(nLoc, sd=3), rnorm(nLoc, sd=2), rnorm(nLoc, sd=4)), ncol=3, byrow=FALSE)# replication valuesrepVals <-matrix(c(rnorm(nLoc*nRep, sd=5), rnorm(nLoc*nRep, sd=5), rnorm(nLoc*nRep, sd=4)), ncol=3, byrow=FALSE)# sumsTrait1 <- locVals[pheno$loc, 1] + rep(repVals[, 1], each=nEntry) + IDvals[pheno$ID, 1]Trait2 <- locVals[pheno$loc, 2] + rep(repVals[, 2], each=nEntry) + IDvals[pheno$ID, 2]Trait3 <- locVals[pheno$loc, 3] + rep(repVals[, 3], each=nEntry) + IDvals[pheno$ID, 3]pheno$Trait1 <- pheno$Trait1 + Trait1pheno$Trait2 <- pheno$Trait2 + Trait2pheno$Trait3 <- pheno$Trait3 + Trait3pheno$Trait1 <- pheno$Trait1 + ceiling(abs(min(pheno$Trait1))) + 5pheno$Trait2 <- pheno$Trait2 + ceiling(abs(min(pheno$Trait2))) + 2pheno$Trait3 <- pheno$Trait3 + ceiling(abs(min(pheno$Trait3))) + 10# genotypic valuesgeno <- matrix(sample(c(0:2), 15*nEntry, replace=TRUE), nrow=nEntry, ncol=15)rownames(geno) <- 1:nEntrycolnames(geno) <- paste("M", 1:15, sep="")# map infomationmap <- 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))head(map)# create a gpData objectgpTest <- create.gpData(pheno=pheno, geno=geno, map=map, repeated = c("loc", "wdh"), modCovar = c("loc", "wdh"))O seguinte erro aparece :> gpTest <- create.gpData(pheno=pheno, geno=geno, map=map, repeated = c("loc", "wdh"), modCovar = c("loc", "wdh"))Error: could not find function "create.gpData"Alguém poderia me ajudar ???Desde já agradeço.Att,Giselle
_______________________________________________
R-br mailing list
R-br@listas.c3sl.ufpr.br
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código mínimo reproduzível.