[R-gregmisc-users] SF.net SVN: r-gregmisc:[1991] trunk/gdata/R/mapLevels.R
Brought to you by:
warnes
|
From: <wa...@us...> - 2015-04-29 03:27:52
|
Revision: 1991
http://sourceforge.net/p/r-gregmisc/code/1991
Author: warnes
Date: 2015-04-29 03:27:50 +0000 (Wed, 29 Apr 2015)
Log Message:
-----------
In mapLevels(), use sapply() instead of lapply() to avoid warning message.
Modified Paths:
--------------
trunk/gdata/R/mapLevels.R
Modified: trunk/gdata/R/mapLevels.R
===================================================================
--- trunk/gdata/R/mapLevels.R 2015-04-29 02:00:21 UTC (rev 1990)
+++ trunk/gdata/R/mapLevels.R 2015-04-29 03:27:50 UTC (rev 1991)
@@ -300,8 +300,8 @@
## --- Mapping levels in x ---
- char <- all(lapply(value, is.character))
- int <- all(lapply(value, is.integer))
+ char <- all(sapply(value, is.character))
+ int <- all(sapply(value, is.integer))
if(int) { # codes=TRUE
if(is.integer(x)) x <- factor(x)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|