[adegenet-commits] r182 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 25 19:21:50 CEST 2008


Author: jombart
Date: 2008-09-25 19:21:50 +0200 (Thu, 25 Sep 2008)
New Revision: 182

Modified:
   pkg/man/accessors.Rd
Log:
added doc for [loc=...].


Modified: pkg/man/accessors.Rd
===================================================================
--- pkg/man/accessors.Rd	2008-09-25 17:11:24 UTC (rev 181)
+++ pkg/man/accessors.Rd	2008-09-25 17:21:50 UTC (rev 182)
@@ -22,6 +22,11 @@
   "obj" is a \linkS4class{genpop}) of "obj" \cr
   - "obj[1:10, 5:10]" returns an object keeping the first 10 entities and
   the alleles 5 to 10.\cr
+  - "obj[nloc=c("L1","L3")]" returns an object keeping only the loci
+  specified in the \code{loc} argument (using generic names, not true
+  names; in this example, only the first and the third locus would be
+  retained)\cr
+  
   The argument \code{treatOther} handles the treatment of objects in the
   \code{@other} slot (see details).
 }
@@ -66,7 +71,12 @@
 obj$loc.fac 
 obj$loc.names
 
-# illustrate how other slot is handled
+# or more simply
+nancycats[loc=c("L2","L7")]
+obj$loc.fac 
+obj$loc.names
+
+# illustrate how 'other' slot is handled
 colonies <- genind2genpop(nancycats)
 colonies at other$aChar <- "This will not be proceeded"
 colonies123 <- colonies[1:3]



More information about the adegenet-commits mailing list