[adegenet-commits] r754 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 5 17:02:28 CET 2011
Author: jombart
Date: 2011-01-05 17:02:27 +0100 (Wed, 05 Jan 2011)
New Revision: 754
Modified:
pkg/R/SNPbin.R
pkg/man/accessors.Rd
Log:
Written the doc for SNPbin. Pfiouuuu
Modified: pkg/R/SNPbin.R
===================================================================
--- pkg/R/SNPbin.R 2011-01-05 15:03:44 UTC (rev 753)
+++ pkg/R/SNPbin.R 2011-01-05 16:02:27 UTC (rev 754)
@@ -372,6 +372,18 @@
})
+setMethod("$<-","SNPbin",function(x,name,value) {
+ slot(x,name,check=TRUE) <- value
+ return(x)
+})
+
+
+setMethod("$<-","genlight",function(x,name,value) {
+ slot(x,name,check=TRUE) <- value
+ return(x)
+})
+
+
setMethod("names", signature(x = "SNPbin"), function(x){
return(slotNames(x))
})
Modified: pkg/man/accessors.Rd
===================================================================
--- pkg/man/accessors.Rd 2011-01-05 15:03:44 UTC (rev 753)
+++ pkg/man/accessors.Rd 2011-01-05 16:02:27 UTC (rev 754)
@@ -10,6 +10,8 @@
\alias{nLoc}
\alias{nLoc,genind-method}
\alias{nLoc,genpop-method}
+\alias{nInd}
+\alias{nInd,genind-method}
\alias{pop}
\alias{pop<-}
\alias{pop,genind-method}
@@ -17,6 +19,11 @@
\alias{locNames}
\alias{locNames,genind-method}
\alias{locNames,genpop-method}
+\alias{indNames}
+\alias{indNames,genind-method}
+\alias{ploidy}
+\alias{ploidy,genind-method}
+\alias{ploidy,genpop-method}
\title{ Accessors for adegenet objects}
\description{
An accessor is a function that allows to interact with slots of an
@@ -48,21 +55,30 @@
}
\section{Methods}{
\describe{
+ \item{nInd}{returns the number of individuals in the \code{genind} object}
\item{nLoc}{returns the number of loci of the object}
\item{pop}{returns the population factor of the object, using true
(as opposed to generic) levels.}
\item{pop<-}{replacement method for the \code{@pop} slot of an
object. The content of \code{@pop} and \code{@pop.names} is updated
automatically.}
+ \item{indNames}{returns the true names of individuals.}
\item{locNames}{returns the true names of markers and/or alleles.}
+ \item{ploidy}{returns the ploidy of the data.}
}
}
\usage{
+nInd(x, \dots)
nLoc(x, \dots)
pop(x)
+indNames(x, \dots)
+\S4method{indNames}{genind}(x, \dots)
locNames(x, \dots)
\S4method{locNames}{genind}(x, withAlleles=FALSE, \dots)
\S4method{locNames}{genpop}(x, withAlleles=FALSE, \dots)
+ploidy(x, \dots)
+\S4method{ploidy}{genind}(x, \dots)
+\S4method{ploidy}{genpop}(x, \dots)
}
\arguments{
\item{x}{a \linkS4class{genind} or a \linkS4class{genpop} object.}
More information about the adegenet-commits
mailing list