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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 14 17:21:11 CEST 2013


Author: jombart
Date: 2013-05-14 17:21:10 +0200 (Tue, 14 May 2013)
New Revision: 1127

Modified:
   pkg/R/auxil.R
   pkg/man/auxil.Rd
Log:
fixed handling of missing data

Modified: pkg/R/auxil.R
===================================================================
--- pkg/R/auxil.R	2013-05-14 15:20:13 UTC (rev 1126)
+++ pkg/R/auxil.R	2013-05-14 15:21:10 UTC (rev 1127)
@@ -197,7 +197,7 @@
 ## translate numeric values into colors of a palette
 num2col <- function(x, col.pal=heat.colors, reverse=FALSE,
                     x.min=min(x,na.rm=TRUE), x.max=max(x,na.rm=TRUE),
-                    na.col="green"){
+                    na.col="transparent"){
     ## if(any(is.na(x))) warning("NAs detected in x")
     x[x < x.min] <- x.min
     x[x > x.max] <- x.max
@@ -226,7 +226,7 @@
 ###########
 ## translate a factor into colors of a palette
 ## colors are randomized based on the provided seed
-fac2col <- function(x, col.pal=funky, na.col="grey", seed=NULL){
+fac2col <- function(x, col.pal=funky, na.col="transparent", seed=NULL){
     ## get factors and levels
     x <- factor(x)
     lev <- levels(x)

Modified: pkg/man/auxil.Rd
===================================================================
--- pkg/man/auxil.Rd	2013-05-14 15:20:13 UTC (rev 1126)
+++ pkg/man/auxil.Rd	2013-05-14 15:21:10 UTC (rev 1127)
@@ -72,8 +72,8 @@
 corner(text, posi="topleft",  inset=0.1, \dots)
 num2col(x, col.pal=heat.colors, reverse=FALSE,
         x.min=min(x,na.rm=TRUE), x.max=max(x,na.rm=TRUE),
-        na.col="green")
-fac2col(x, col.pal=funky, na.col="grey", seed=NULL)
+        na.col="transparent")
+fac2col(x, col.pal=funky, na.col="transparent", seed=NULL)
 any2col(x, col.pal=seasun, na.col="transparent")
 transp(col, alpha=.5)
 }



More information about the adegenet-commits mailing list