[Subgroup-commits] r45 - pkg/rsubgroup/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 4 23:13:26 CEST 2014


Author: atzmueller
Date: 2014-08-04 23:13:26 +0200 (Mon, 04 Aug 2014)
New Revision: 45

Modified:
   pkg/rsubgroup/R/subgroup.R
Log:
fix 'no visible binding for global variable' NOTE

Modified: pkg/rsubgroup/R/subgroup.R
===================================================================
--- pkg/rsubgroup/R/subgroup.R	2014-08-04 19:14:53 UTC (rev 44)
+++ pkg/rsubgroup/R/subgroup.R	2014-08-04 21:13:26 UTC (rev 45)
@@ -32,13 +32,17 @@
 setMethod(".CreateARFFProvider", signature(source = "data.frame", name = "character"),
     function(source, name, ...) {
       # Creates a dataset provider (converting the dataframe)
-      con <- textConnection("arffVector", "w")
+      arff.vector <- NULL # This prevents the R CHECK NOTE:
+      # 'No visible bindingfor global variable Note in R CMD check'
+      
+      con <- textConnection("arff.vector", open = "w", local = TRUE)
       write.arff(source, con)
       flush(con)
       close(con)
       rm(con)
-      arff <- paste(arffVector, "", collapse="\n")
+      arff <- paste(arff.vector, "", collapse="\n")
       provider <- .jnew("org/vikamine/kernel/xpdl/ARFFAsStringDatasetProvider", arff, name)
+      rm(arff.vector)
       return(provider)
     }
 )
@@ -151,7 +155,7 @@
   return(as.character(sgSelectorArray))
 }
 
-DiscoverSubgroupsByTask <- function(task, as.df=FALSE) {
+DiscoverSubgroupsByTask <- function(task, as.df = FALSE) {
   # Internal function for setting up and performing subgroup discovery
   # Args:
   #   task: A subgroup discovery task



More information about the Subgroup-commits mailing list