[adegenet-commits] r228 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Jan 24 20:47:15 CET 2009
Author: jombart
Date: 2009-01-24 20:47:14 +0100 (Sat, 24 Jan 2009)
New Revision: 228
Modified:
pkg/R/classes.R
pkg/R/import.R
pkg/man/as.genind.Rd
pkg/man/as.genpop.Rd
pkg/man/df2genind.Rd
Log:
PA -> domin
Modified: pkg/R/classes.R
===================================================================
--- pkg/R/classes.R 2009-01-24 19:36:43 UTC (rev 227)
+++ pkg/R/classes.R 2009-01-24 19:47:14 UTC (rev 228)
@@ -200,7 +200,7 @@
}
## check type of marker
- if(!object at type %in% c("codom","PA") ){
+ if(!object at type %in% c("codom","domin") ){
cat("\nunknowon type of marker\n")
return(FALSE)
}
@@ -278,7 +278,7 @@
# Function genind
##################
## constructor of a genind object
-genind <- function(tab,pop=NULL,prevcall=NULL,ploidy=2,type=c("codom","PA")){
+genind <- function(tab,pop=NULL,prevcall=NULL,ploidy=2,type=c("codom","domin")){
X <- as.matrix(tab)
if(is.null(colnames(X))) stop("tab columns have no name.")
@@ -394,7 +394,7 @@
##################
# Function genpop
##################
-genpop <- function(tab,prevcall=NULL,ploidy=as.integer(2),type=c("codom","PA")){
+genpop <- function(tab,prevcall=NULL,ploidy=as.integer(2),type=c("codom","domin")){
X <- as.matrix(tab)
if(is.null(colnames(X))) stop("tab columns have no name.")
Modified: pkg/R/import.R
===================================================================
--- pkg/R/import.R 2009-01-24 19:36:43 UTC (rev 227)
+++ pkg/R/import.R 2009-01-24 19:47:14 UTC (rev 228)
@@ -40,7 +40,7 @@
#####################
# Function df2genind
#####################
-df2genind <- function(X, sep=NULL, ncode=NULL, ind.names=NULL, loc.names=NULL, pop=NULL, missing=NA, ploidy=2, type=c("codom","PA")){
+df2genind <- function(X, sep=NULL, ncode=NULL, ind.names=NULL, loc.names=NULL, pop=NULL, missing=NA, ploidy=2, type=c("codom","domin")){
if(is.data.frame(X)) X <- as.matrix(X)
if (!inherits(X, "matrix")) stop ("X is not a matrix")
Modified: pkg/man/as.genind.Rd
===================================================================
--- pkg/man/as.genind.Rd 2009-01-24 19:36:43 UTC (rev 227)
+++ pkg/man/as.genind.Rd 2009-01-24 19:47:14 UTC (rev 228)
@@ -20,8 +20,8 @@
}
\usage{
-genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type="codom")
-as.genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type="codom")
+genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","PA"))
+as.genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","PA"))
is.genind(x)
}
@@ -31,7 +31,8 @@
Its content depends on \code{type} (type of marker).\cr
- 'codom': table contains allele frequencies (numeric values summing
to 1).\cr
- - 'PA': table contains presence/absences (0,1).
+ - 'domin': table contains binary values, which indicate
+ presence(1)/absence(0) of alleles.\cr
}
\item{pop}{a factor giving the population of each genotype in 'x'}
\item{prevcall}{call of an object}
Modified: pkg/man/as.genpop.Rd
===================================================================
--- pkg/man/as.genpop.Rd 2009-01-24 19:36:43 UTC (rev 227)
+++ pkg/man/as.genpop.Rd 2009-01-24 19:47:14 UTC (rev 228)
@@ -19,8 +19,8 @@
'class ? genpop'.
}
\usage{
-genpop(tab,prevcall=NULL, ploidy=as.integer(2), type="codom")
-as.genpop(tab,prevcall=NULL)
+genpop(tab,prevcall=NULL, ploidy=as.integer(2), type=c("codom","domin"))
+as.genpop(tab, type=c("codom","domin"), prevcall=NULL)
is.genpop(x)
}
\arguments{
@@ -31,7 +31,7 @@
the genotypes. Beware: 2 is not an integer, but as.integer(2) is.}
\item{\code{type}:}{ a character string indicating the type of
marker: 'codom' stands for 'codominant' (e.g. microstallites,
- allozymes); 'PA' stands for 'presence/absence' (e.g. AFLP).}
+ allozymes); 'domin' stands for 'dominant' (e.g. AFLP, RAPD).}
\item{x}{an object}
}
\value{
Modified: pkg/man/df2genind.Rd
===================================================================
--- pkg/man/df2genind.Rd 2009-01-24 19:36:43 UTC (rev 227)
+++ pkg/man/df2genind.Rd 2009-01-24 19:47:14 UTC (rev 228)
@@ -22,7 +22,7 @@
}
\usage{
df2genind(X, sep=NULL, ncode=NULL, ind.names=NULL, loc.names=NULL,
- pop=NULL, missing=NA, ploidy=2, type=c("codom","PA"))
+ pop=NULL, missing=NA, ploidy=2, type=c("codom","domin"))
genind2df(x,pop=NULL, sep="", usepop=TRUE)
}
\arguments{
@@ -37,9 +37,9 @@
\item{pop}{an optional factor giving the population of each individual.}
\item{missing}{can be NA, 0 or "mean". See details section.}
\item{ploidy}{an integer indicating the degree of ploidy of the genotypes.}
- \item{\code{type}:}{ a character string indicating the type of
- marker: 'codom' (default) stands for 'codominant' (e.g. microstallites,
- allozymes); 'PA' stands for 'presence/absence' (e.g. SNP, AFLP).}
+ \item{\code{type}:}{ a character string indicating the type of
+ marker: 'codom' stands for 'codominant' (e.g. microstallites,
+ allozymes); 'domin' stands for 'dominant' (e.g. AFLP, RAPD).}
\item{x}{a \linkS4class{genind} object}
\item{usepop}{a logical stating whether the population (argument \code{pop}
or \code{x at pop} should be used (TRUE, default) or not (FALSE).}
More information about the adegenet-commits
mailing list