From 2e2cbabb524134df9566665d29cb63ea302ff778 Mon Sep 17 00:00:00 2001 From: Marwan Hassani Date: Mon, 12 Oct 2015 17:03:17 +0000 Subject: [PATCH] version 1.0.4 --- DESCRIPTION | 8 ++++---- MD5 | 4 ++-- R/onLoad.R | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b44c074..8def25f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,9 +1,9 @@ Package: subspace Title: Interface to OpenSubspace -Version: 1.0.3 +Version: 1.0.4 Date: 2015-09-30 Authors@R: c( person("Marwan","Hassani",role=c("aut","cre"),email="rsubspace@cs.rwth-aachen.de"), - person("Matthias","Hansen",role=c("aut"),email="matthias.hansen@rwth-aachen.de"), + person("Matthias","Hansen",role=c("aut")), person("Emmanuel","Müller",role="ctb"), person("Ira","Assent",role="ctb"), person("Stephan","Günnemann",role="ctb"), @@ -21,7 +21,7 @@ SystemRequirements: Java (>= 6) Encoding: UTF-8 License: GPL-2 NeedsCompilation: no -Packaged: 2015-10-03 10:40:29 UTC; mth +Packaged: 2015-10-12 13:16:59 UTC; mth Author: Marwan Hassani [aut, cre], Matthias Hansen [aut], Emmanuel Müller [ctb], @@ -32,4 +32,4 @@ Author: Marwan Hassani [aut, cre], University of Waikato [ctb, cph] Maintainer: Marwan Hassani Repository: CRAN -Date/Publication: 2015-10-03 14:49:23 +Date/Publication: 2015-10-12 17:03:17 diff --git a/MD5 b/MD5 index 3eac354..0c06649 100644 --- a/MD5 +++ b/MD5 @@ -1,11 +1,11 @@ -5207617c0ec871a4291fd45fc1fcca80 *DESCRIPTION +9f77ea8a63db02c84efaa25c59cc194d *DESCRIPTION b19106de9afa7e0d8dcfd771177efa90 *NAMESPACE 7f0efc54d6993f5efced1b03982f24fa *R/clique.R 620a0339c528a0cf1f7e85fa8f8664ff *R/dataset_doc.R 31d7a0b6fceeff1ce8cf96bc9476ee82 *R/file_io.R 8629919fe784171d2634ea6ca52d2be9 *R/fires.R e9384f50d5d0676257e8154c5d404013 *R/java_object_from_data.R -25c61b36038e558215e9ba56b53ec73a *R/onLoad.R +2d06735d302585e1f8476f9dbb7af354 *R/onLoad.R 60160631a40efd61ae42ac0de246b24f *R/p3c.R ee35ee68480ba5df0653e89cab34f0a8 *R/package_doc.R 4d200671d3db6169eeedbd59188f2b70 *R/plot.R diff --git a/R/onLoad.R b/R/onLoad.R index 876d68f..43a4027 100644 --- a/R/onLoad.R +++ b/R/onLoad.R @@ -1,3 +1,19 @@ .onLoad <- function(libname,pkgname) { + #Load the jar files that this package uses. rJava::.jpackage(name=pkgname,lib.loc=libname) + + # Problem: loading the Weka jars creates a new directory called wekafiles in + # the user's home directory. This is bad because nothing meaningful (for this + # package) is saved in that directory and creating useless directories is Bad + # Behavior and also against the policies of CRAN. + # Workaround: (proposed by Kurt Hornik) + # If the directory given by + # WEKA_HOME (or its default $HOME/wekafiles) was not created yet, make sure it + # gets created in tempdir(). + if(is.na(isdir <- + file.info(Sys.getenv("WEKA_HOME", + file.path(path.expand("~"), + "wekafiles")))$isdir) || + !isdir) + Sys.setenv(WEKA_HOME = tempfile("subspace")) } \ No newline at end of file