[adegenet-commits] r627 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 13 11:04:03 CEST 2010


Author: jombart
Date: 2010-05-13 11:04:02 +0200 (Thu, 13 May 2010)
New Revision: 627

Modified:
   pkg/R/haploGen.R
   pkg/R/seqTrack.R
   pkg/man/haploGen.Rd
Log:
Changes not commited yesterday + progresses in the doc of haploGen.


Modified: pkg/R/haploGen.R
===================================================================
--- pkg/R/haploGen.R	2010-05-11 09:54:14 UTC (rev 626)
+++ pkg/R/haploGen.R	2010-05-13 09:04:02 UTC (rev 627)
@@ -21,15 +21,18 @@
 
     ## HANDLE ARGUMENTS ##
     if(is.numeric(mu)){
-        mu <- function(){mu}
+        mu.val <- mu
+        mu <- function(){return(mu.val)}
     }
 
     if(is.numeric(gen.time)){
-        gen.time <- function(){gen.time}
+        gen.time.val <- gen.time
+        gen.time <- function(){gen.time.val}
     }
 
     if(is.numeric(repro)){
-        repro <- function(){repro}
+        repro.val <- repro
+        repro <- function(){repro.val}
     }
 
 
@@ -533,7 +536,7 @@
 ##########################
 ## as("haploGen", "graphNEL")
 ##########################
-setOldClass("haploGen")
+if(require(graph)) setOldClass("haploGen")
 setAs("haploGen", "graphNEL", def=function(from){
     if(!require(ape)) stop("package ape is required")
     if(!require(graph)) stop("package graph is required")

Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R	2010-05-11 09:54:14 UTC (rev 626)
+++ pkg/R/seqTrack.R	2010-05-13 09:04:02 UTC (rev 627)
@@ -250,7 +250,7 @@
         on.exit(par(bg=obg))
         if(!add){
             par(bg=bg)
-            plot(xy, type="n")
+            plot(xy, type="n", ...)
         }
     }
 

Modified: pkg/man/haploGen.Rd
===================================================================
--- pkg/man/haploGen.Rd	2010-05-11 09:54:14 UTC (rev 626)
+++ pkg/man/haploGen.Rd	2010-05-13 09:04:02 UTC (rev 627)
@@ -11,7 +11,7 @@
 \alias{as.seqTrack.haploGen}
 \alias{plotHaploGen}
 \alias{sample.haploGen}
-\alias{as,haploGen,graphNEL-method}
+%\alias{as,haploGen,graphNEL-method}
 \alias{coerce,haploGen,graphNEL-method}
 \title{Simulation of populations of haplotypes}
 \description{
@@ -29,13 +29,13 @@
 
 print.haploGen(x, ...)
 
-"[.haploGen"(x,i,j,drop=FALSE)
+\method{[}{haploGen}(x, i, j, drop=FALSE)
 
-labels.haploGen(object, ...)
+\method{labels}{haploGen}(object, ...)
 
 as.POSIXct.haploGen(x, tz="", origin=as.POSIXct("2000/01/01"), ...)
 
-seqTrack.haploGen(x, best=c("min","max"), prox.mat=NULL, ...)
+\method{seqTrack}{haploGen}(x, best=c("min","max"), prox.mat=NULL, ...)
 
 as.seqTrack.haploGen(x)
 
@@ -43,7 +43,7 @@
 
 sample.haploGen(x, n)
 
-setAs("haploGen", "graphNEL", def=function(from)
+\S4method{coerce}{haploGen, graphNEL}(from, to)
 
 }
 \arguments{
@@ -65,5 +65,6 @@
   \item{prox.mat}{}
   \item{annot,date.range,col,bg,add}{}
   \item{n}{}
+\item{from,to}{}
  }
 \author{Thibaut Jombart \email{t.jombart at imperial.ac.uk}}



More information about the adegenet-commits mailing list