[adegenet-commits] r857 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Mar 30 01:08:58 CEST 2011
Author: jombart
Date: 2011-03-30 01:08:57 +0200 (Wed, 30 Mar 2011)
New Revision: 857
Modified:
pkg/R/dapc.R
pkg/man/auxil.Rd
pkg/man/dapc.Rd
pkg/man/genlight.Rd
pkg/man/seploc.Rd
Log:
PKg passes the check now.
Yepeeee
Modified: pkg/R/dapc.R
===================================================================
--- pkg/R/dapc.R 2011-03-29 22:12:02 UTC (rev 856)
+++ pkg/R/dapc.R 2011-03-29 23:08:57 UTC (rev 857)
@@ -743,7 +743,7 @@
UseMethod("as.lda")
}
-as.lda.dapc <- function(x){
+as.lda.dapc <- function(x, ...){
if(!inherits(x,"dapc")) stop("x is not a dapc object")
res <- list()
Modified: pkg/man/auxil.Rd
===================================================================
--- pkg/man/auxil.Rd 2011-03-29 22:12:02 UTC (rev 856)
+++ pkg/man/auxil.Rd 2011-03-29 23:08:57 UTC (rev 857)
@@ -7,12 +7,15 @@
\alias{.rmspaces}
\alias{.genlab}
\alias{.readExt}
+\alias{corner}
+\alias{num2col}
+\alias{transp}
\title{ Utilities functions for adegenet}
\description{
- These functions are mostly used internally in adegenet.
- The notable exceptions are \code{adegenetWeb} which opens the adegenet
- website in the default navigator, and \code{adegenetTutorial} which
- opens online tutorials for adegenet.\cr
+ These functions are mostly used internally in adegenet. The notable
+ exceptions are \code{adegenetWeb} which opens the adegenet website in
+ the default navigator, \code{adegenetTutorial} which opens online
+ tutorials for adegenet, and a few auxiliary graphical functions.\cr
The other functions are:\cr
- \code{checkType}: checks the type of markers being used in a
@@ -20,18 +23,41 @@
- \code{.rmspaces}: remove peripheric spaces in a character string. \cr
- \code{.genlab}: generate labels in a correct alphanumeric ordering. \cr
- \code{.readExt}: read the extension of a given file. \cr
-
+ - \code{corner}: adds text to a corner of a figure. \cr
+ - \code{num2col}: translates a numeric vector into colors. \cr
+ - \code{transp}: adds transparency to a vector of colors. Note that
+ transparent colors are not supported on some graphical devices.\cr
}
\usage{
adegenetWeb()
adegenetTutorial(which=c("general","spca"))
.genlab(base, n)
+corner(text, posi="topleft", inset=0.1, \dots)
+num2col(x, col.pal=heat.colors, reverse=FALSE,
+ x.min=min(x), x.max=max(x), na.col="green")
+transp(col, alpha=.5)
}
\arguments{
\item{which}{a character string being "general" or "spca", indicating
which tutorial should be opened.}
\item{base}{a character string forming the base of the labels}
\item{n}{the number of labels to generate}
+ \item{text}{a character string to be added to the plot}
+ \item{posi}{a character matching any combinations of "top/bottom" and
+ "left/right".}
+ \item{inset}{a vector of two numeric values (recycled if needed)
+ indicating the inset, as a fraction of the plotting region.}
+ \item{\dots}{further arguments to be passed to \code{\link{text}}}
+ \item{x}{a numeric vector}
+ \item{col.pal}{a function generating colors according to a given palette.}
+ \item{reverse}{a logical stating whether the palette should be
+ inverted (TRUE), or not (FALSE, default).}
+ \item{x.min}{the minimal value from which to start the color scale}
+ \item{x.max}{the maximal value from which to start the color scale}
+ \item{na.col}{the color to be used for missing values (NAs)}
+ \item{col}{a vector of colors}
+ \item{alpha}{a numeric value between 0 and 1 representing the alpha
+ coefficient; 0: total transparency; 1: no transparency.}
}
\value{
For \code{.genlab}, a character vector of size "n".
Modified: pkg/man/dapc.Rd
===================================================================
--- pkg/man/dapc.Rd 2011-03-29 22:12:02 UTC (rev 856)
+++ pkg/man/dapc.Rd 2011-03-29 23:08:57 UTC (rev 857)
@@ -11,6 +11,8 @@
\alias{scatter.dapc}
\alias{assignplot}
\alias{predict.dapc}
+\alias{as.lda}
+\alias{as.lda.dapc}
\title{Discriminant Analysis of Principal Components (DAPC)}
\description{
These functions implement the Discriminant Analysis of Principal
@@ -45,6 +47,11 @@
and \code{\link[MASS]{lda}} from the \code{MASS} package. The
\code{predict} procedure uses \code{\link[MASS]{predict.lda}} from the
\code{MASS} package.
+
+ \code{as.lda} is a generic with a method for \code{dapc} object which
+ converts these objects into outputs similar to that of
+ \code{lda.default}.
+
}
\usage{
\method{dapc}{data.frame}(x, grp, n.pca=NULL, n.da=NULL, center=TRUE,
@@ -76,7 +83,7 @@
cleg = 1, cgrid = 1, pixmap = NULL, contour = NULL, area = NULL,
\ldots)
-assignplot(x, only.grp=NULL, subset=NULL, cex.lab=.75, pch=3)
+assignplot(x, only.grp=NULL, subset=NULL, new.pred=NULL, cex.lab=.75, pch=3)
\method{predict}{dapc}(object, newdata, prior = object$prior, dimen,
method = c("plug-in", "predictive", "debiased"), ...)
@@ -148,6 +155,10 @@
\item{pch}{a \code{numeric} indicating the type of point to be used to indicate
the prior group of individuals (see \code{\link{points}} documentation for
more details).}
+ \item{new.pred}{an optional list, as returned by the \code{predict}
+ method for \code{dapc} objects; if provided, the individuals
+ with unknown groups are added at the bottom of the plot. To
+ visualize these individuals only, specify \code{only.grp="unknown"}.}
\item{dudi}{optionally, a multivariate analysis with the class
\code{dudi} (from the ade4 package). If provided, prior PCA will be
ignored, and this object will be used as a prior step for variable
Modified: pkg/man/genlight.Rd
===================================================================
--- pkg/man/genlight.Rd 2011-03-29 22:12:02 UTC (rev 856)
+++ pkg/man/genlight.Rd 2011-03-29 23:08:57 UTC (rev 857)
@@ -115,9 +115,12 @@
SNPs.}
\item{\code{loc.all}:}{a vector of characters indicating the alleles
of each SNP.}
+ \item{\code{chromosome}:}{an optional factor indicating the
+ chromosome to which each SNP belongs.}
+ \item{\code{position}:}{an optional vector of integers indicating the
+ position of the SNPs.}
\item{\code{ploidy}:}{a vector of integers indicating the ploidy of each individual.}
- \item{\code{pop}:}{a factor indicating the population of each
- individual.}
+ \item{\code{pop}:}{a factor indicating the population of each individual.}
\item{\code{other}:}{a list containing other miscellaneous information.}
}
}
Modified: pkg/man/seploc.Rd
===================================================================
--- pkg/man/seploc.Rd 2011-03-29 22:12:02 UTC (rev 856)
+++ pkg/man/seploc.Rd 2011-03-29 23:08:57 UTC (rev 857)
@@ -6,6 +6,7 @@
\alias{seploc,ANY-method}
\alias{seploc,genind-method}
\alias{seploc,genpop-method}
+\alias{seploc,genlight-method}
\title{ Separate data per locus}
\description{
The function \code{seploc} splits an object (\linkS4class{genind} or
More information about the adegenet-commits
mailing list