[R-br] gpData

André Figueiras Rutz rutzaf em gmail.com
Quinta Fevereiro 20 17:34:54 BRT 2014


Vc carregou ele na sessão com o require?

"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
Em 20/02/2014 17:30, "Giselle Davi" <giselle_davi em yahoo.com.br> escreveu:

> Sim, está !!!
>
>
>   Em Quinta-feira, 20 de Fevereiro de 2014 17:02, André Figueiras Rutz <
> rutzaf em gmail.com> escreveu:
>  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
> Em 20/02/2014 15:50, "Giselle Davi" <giselle_davi em yahoo.com.br> escreveu:
>
> Ao rodar esta rotina:
> #############################################
> ## Test gpData object and regress
> ##
> ##
> ## author : Hans-Juergen Auinger
> ## date : 2011 - 11 - 30
> ##
> ##############################################
>
> # number of locations
> nLoc <- 3
> # number of genotypes
> nEntry <- 10
> # number of replications
> nRep <- 2
> # phenotypic residuals
> pheno <- 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 values
> IDvals <- matrix(c(rnorm(nEntry, sd=1),rnorm(nEntry, sd=2),rnorm(nEntry,
> sd=4)), ncol=3, byrow=FALSE)
> head(IDvals)
> # location values
> locVals <- matrix(c(rnorm(nLoc, sd=3), rnorm(nLoc, sd=2), rnorm(nLoc,
> sd=4)), ncol=3, byrow=FALSE)
> # replication values
> repVals <-matrix(c(rnorm(nLoc*nRep, sd=5), rnorm(nLoc*nRep, sd=5),
> rnorm(nLoc*nRep, sd=4)), ncol=3, byrow=FALSE)
> # sums
> Trait1 <- 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 + Trait1
> pheno$Trait2 <- pheno$Trait2 + Trait2
> pheno$Trait3 <- pheno$Trait3 + Trait3
> pheno$Trait1 <- pheno$Trait1 + ceiling(abs(min(pheno$Trait1))) + 5
> pheno$Trait2 <- pheno$Trait2 + ceiling(abs(min(pheno$Trait2))) + 2
> pheno$Trait3 <- pheno$Trait3 + ceiling(abs(min(pheno$Trait3))) + 10
> # genotypic values
> geno <- matrix(sample(c(0:2), 15*nEntry, replace=TRUE), nrow=nEntry,
> ncol=15)
> rownames(geno) <- 1:nEntry
> colnames(geno) <- paste("M", 1:15, sep="")
> # map infomation
> 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))
> head(map)
> # create a gpData object
> gpTest <- 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 em 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.
>
>
> _______________________________________________
> R-br mailing list
> R-br em 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.
>
>
>
> _______________________________________________
> R-br mailing list
> R-br em 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.
>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20140220/7700d9bc/attachment.html>


Mais detalhes sobre a lista de discussão R-br