[adegenet-commits] r243 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Jan 25 18:39:42 CET 2009
Author: jombart
Date: 2009-01-25 18:39:42 +0100 (Sun, 25 Jan 2009)
New Revision: 243
Modified:
pkg/R/classes.R
pkg/R/import.R
pkg/man/as.genind.Rd
pkg/man/as.genpop.Rd
pkg/man/df2genind.Rd
Log:
domin -> PA
Modified: pkg/R/classes.R
===================================================================
--- pkg/R/classes.R 2009-01-25 17:31:35 UTC (rev 242)
+++ pkg/R/classes.R 2009-01-25 17:39:42 UTC (rev 243)
@@ -203,7 +203,7 @@
}
## check type of marker
- if(!object at type %in% c("codom","domin") ){
+ if(!object at type %in% c("codom","PA") ){
cat("\nunknown type of marker\n")
return(FALSE)
}
@@ -249,7 +249,7 @@
}
## check type of marker
- if(!object at type %in% c("codom","domin") ){
+ if(!object at type %in% c("codom","PA") ){
cat("\nunknown type of marker\n")
return(FALSE)
}
@@ -293,7 +293,7 @@
# Function genind
##################
## constructor of a genind object
-genind <- function(tab,pop=NULL,prevcall=NULL,ploidy=2,type=c("codom","domin")){
+genind <- function(tab,pop=NULL,prevcall=NULL,ploidy=2,type=c("codom","PA")){
## handle arguments
X <- as.matrix(tab)
if(is.null(colnames(X))) stop("tab columns have no name.")
@@ -342,7 +342,7 @@
rownames(X) <- ind.codes
colnames(X) <- paste(loc.fac,unlist(all.codes),sep=".")
loc.fac <- as.factor(loc.fac)
- } else { # end if type=="codom" <=> if type=="domin"
+ } else { # end if type=="codom" <=> if type=="PA"
nloc <- ncol(X)
loc.codes <- .genlab("N", nloc)
colnames(X) <- loc.codes
@@ -406,7 +406,7 @@
##################
# Function genpop
##################
-genpop <- function(tab,prevcall=NULL,ploidy=as.integer(2),type=c("codom","domin")){
+genpop <- function(tab,prevcall=NULL,ploidy=as.integer(2),type=c("codom","PA")){
## handle args
X <- as.matrix(tab)
@@ -456,7 +456,7 @@
rownames(X) <- pop.codes
colnames(X) <- paste(loc.fac,unlist(all.codes),sep=".")
loc.fac <- as.factor(loc.fac)
- } else { # end if type=="codom" <=> if type=="domin"
+ } else { # end if type=="codom" <=> if type=="PA"
nloc <- ncol(X)
loc.codes <- .genlab("N", nloc)
colnames(X) <- loc.codes
Modified: pkg/R/import.R
===================================================================
--- pkg/R/import.R 2009-01-25 17:31:35 UTC (rev 242)
+++ pkg/R/import.R 2009-01-25 17:39:42 UTC (rev 243)
@@ -18,7 +18,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","domin")){
+df2genind <- function(X, sep=NULL, ncode=NULL, ind.names=NULL, loc.names=NULL, pop=NULL, missing=NA, ploidy=2, type=c("codom","PA")){
if(is.data.frame(X)) X <- as.matrix(X)
if (!inherits(X, "matrix")) stop ("X is not a matrix")
@@ -271,8 +271,8 @@
########################################
read.genetix <- function(file=NULL,missing=NA,quiet=FALSE) {
if(!quiet) cat("\n Converting data from GENETIX to a genind object... \n")
-
+
## read from file
## if(!file.exists(file)) stop("Specified file does not exist.") <- not needed
Modified: pkg/man/as.genind.Rd
===================================================================
--- pkg/man/as.genind.Rd 2009-01-25 17:31:35 UTC (rev 242)
+++ pkg/man/as.genind.Rd 2009-01-25 17:39:42 UTC (rev 243)
@@ -20,8 +20,8 @@
}
\usage{
-genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","domin"))
-as.genind(tab,pop=NULL,prevcall=NULL, ploidy=2, type=c("codom","domin"))
+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,7 @@
Its content depends on \code{type} (type of marker).\cr
- 'codom': table contains allele frequencies (numeric values summing
to 1).\cr
- - 'domin': table contains binary values, which indicate
+ - 'PA': 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'}
Modified: pkg/man/as.genpop.Rd
===================================================================
--- pkg/man/as.genpop.Rd 2009-01-25 17:31:35 UTC (rev 242)
+++ pkg/man/as.genpop.Rd 2009-01-25 17:39:42 UTC (rev 243)
@@ -19,8 +19,8 @@
'class ? genpop'.
}
\usage{
-genpop(tab,prevcall=NULL, ploidy=as.integer(2), type=c("codom","domin"))
-as.genpop(tab, prevcall=NULL, ploidy=as.integer(2), type=c("codom","domin"))
+genpop(tab,prevcall=NULL, ploidy=as.integer(2), type=c("codom","PA"))
+as.genpop(tab, prevcall=NULL, ploidy=as.integer(2), type=c("codom","PA"))
is.genpop(x)
}
\arguments{
@@ -31,7 +31,7 @@
the genotypes. Beware: 2 is not an integer, but as.integer(2) is.}
\item{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).}
+ allozymes); 'PA' stands for 'presence/absence' (e.g. AFLP, RAPD).}
\item{x}{an object}
}
\value{
Modified: pkg/man/df2genind.Rd
===================================================================
--- pkg/man/df2genind.Rd 2009-01-25 17:31:35 UTC (rev 242)
+++ pkg/man/df2genind.Rd 2009-01-25 17:39:42 UTC (rev 243)
@@ -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","domin"))
+ pop=NULL, missing=NA, ploidy=2, type=c("codom","PA"))
genind2df(x,pop=NULL, sep="", usepop=TRUE)
}
\arguments{
@@ -39,7 +39,7 @@
\item{ploidy}{an integer indicating the degree of ploidy of the genotypes.}
\item{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).}
+ allozymes); 'PA' stands for 'presence/absence' markers (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