[adegenet-commits] r137 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 28 18:32:02 CEST 2008


Author: jombart
Date: 2008-06-28 18:32:02 +0200 (Sat, 28 Jun 2008)
New Revision: 137

Modified:
   pkg/man/df2genind.Rd
Log:
Doc df2genind update.


Modified: pkg/man/df2genind.Rd
===================================================================
--- pkg/man/df2genind.Rd	2008-06-28 16:20:58 UTC (rev 136)
+++ pkg/man/df2genind.Rd	2008-06-28 16:32:02 UTC (rev 137)
@@ -9,34 +9,35 @@
   requirements:\cr
   - genotypes are in row (on row per genotype)\cr
   - markers are in columns\cr
-  - each element is a string of (2, 4 or 6) characters coding both alleles without
-  separation. Missing values are coded by NA or zeros. Uncomplete
-  strings are filled with "0" at the begining. For instance, "912" in a
-  4-characters coding scheme is interpreted as "0912", thus as an
-  heterozygote with alleles "09" and "12". Note that this format is the
-  one of GENETIX for a 6-characters coding scheme\cr
+  - each element is a string of characters coding alleles with or without
+  separator. If no separator is used, the function tries to find how
+  many characters code each genotypes at a locus, but it is safer to state it
+  (\code{ncode} argument). Uncomplete strings are filled with "0" at the
+  begining. \cr
+  
+  
 
   The function \code{genind2df} converts a \linkS4class{genind} back to
  such a data.frame.
  }
 \usage{
-df2genind(X, ncode=NULL, ind.names=NULL, loc.names=NULL, pop=NULL,
- missing=NA)
-genind2df(x,pop=NULL, sep="",usepop=TRUE)
+df2genind(X, sep=NULL, ncode=NULL, ind.names=NULL, loc.names=NULL, pop=NULL,
+ missing=NA, ploidy=2)
+genind2df(x,pop=NULL, sep="", usepop=TRUE)
 }
 \arguments{
   \item{X}{a matrix or a data.frame (see decription)}
-  \item{ncode}{an optional integer the number of characters used for coding one
-    genotype at one locus (can be 2, 4 or 6). If not provided, this is
-    determined from data.}
+  \item{sep}{a character string separating alleles. See details.}
+  \item{ncode}{an optional integer giving the number of characters used for coding one
+    genotype at one locus. If not provided, this is determined from data.}
   \item{ind.names}{an optional character vector giving the individuals
     names; if NULL, taken from rownames of X.}
   \item{loc.names}{an optional character vector giving the markers
     names; if NULL, taken from colnames of X.}
   \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{x}{a \linkS4class{genind} object}
-  \item{sep}{a character used to separate two alleles}
   \item{usepop}{a logical stating whether the population (argument \code{pop}
     or \code{x at pop} should be used (TRUE, default) or not (FALSE).}
 }
@@ -49,7 +50,12 @@
   
   - "mean": missing values are replaced by the mean frequency of the
   corresponding allele, computed on the whole set of
-  individuals. Recommended for a centred PCA.\cr
+  individuals. Recommended for a centred PCA.\cr\cr
+
+  Details for the \code{sep} argument:\cr
+  this character is directly used in reguar expressions like
+  \code{gsub}, and thus require some characters to be preceeded by
+  double backslashes. For instance, "/" works but "|" must be coded as "\\\\|".
 }
 \value{an object of the class \linkS4class{genind} for \code{df2genind};
   a matrix of biallelic genotypes for \code{genind2df}}



More information about the adegenet-commits mailing list