Error with Deducer in Windows 7 and R 3.0.1

1,529 views
Skip to first unread message

mspin...@gmail.com

unread,
Jun 18, 2013, 5:13:34 PM6/18/13
to ded...@googlegroups.com
Dear group members,

I have the following error when trying:

library(Deducer)

> library(Deducer)
Loading required package: rJava
Loading required package: ggplot2
Loading required package: scales
Loading required package: JGR
Loading required package: JavaGD
Loading required package: iplots

Please type JGR() to download/launch console. Launchers can also be obtained at http://www.rforge.net/JGR/files/.


Loading required package: car
Loading required package: MASS
Loading required package: nnet
Loading required package: multcomp
Loading required package: mvtnorm
Loading required package: survival
Loading required package: splines
Loading required package: effects
Loading required package: lattice
Loading required package: grid
Loading required package: colorspace

Attaching package: ‘effects’

The following object is masked from ‘package:car’:

    Prestige

The following object is masked from ‘package:datasets’:

    Titanic

Loading required package: foreign
Loading required package: plyr
Loading required package: e1071
Loading required package: class


Deducer has been loaded from within the Windows Rgui.
                                For the best experience, you are encouraged to use JGR console which can be
                                downloaded from: http://jgr.markushelbig.org/

Error : .onLoad failed in loadNamespace() for 'Deducer', details:
  call: .jfindClass(as.character(class))
  error: class not found
Error: package or namespace load failed for ‘Deducer’
> deducer('Data viewer')
Error: no se pudo encontrar la función "deducer"





Ian Fellows

unread,
Jun 19, 2013, 12:53:38 AM6/19/13
to ded...@googlegroups.com
so I assume that you are loading from the windows command line not from JGR. Correct?

try updating your packages using update.packages. also, include sessionInfo() in your post.


ian








--
 
---
You received this message because you are subscribed to the Google Groups "Deducer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deducer+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

mspin...@gmail.com

unread,
Jun 19, 2013, 11:38:04 AM6/19/13
to ded...@googlegroups.com
Thank you very much Ian.

Yes, I did it from the command line.  I tried JGR but I couldn't make it work.  I received the error below:

Here is the session info

> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Spanish_Costa Rica.1252  LC_CTYPE=Spanish_Costa Rica.1252   
[3] LC_MONETARY=Spanish_Costa Rica.1252 LC_NUMERIC=C                       
[5] LC_TIME=Spanish_Costa Rica.1252    

attached base packages:
[1] grid      splines   stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] e1071_1.6-1      class_7.3-7      plyr_1.8         foreign_0.8-54  
 [5] effects_2.2-4    colorspace_1.2-2 lattice_0.20-15  multcomp_1.2-18 
 [9] survival_2.37-4  mvtnorm_0.9-9995 car_2.0-18       nnet_7.3-6      
[13] MASS_7.3-26      JGR_1.7-16       iplots_1.1-5     JavaGD_0.6-1    
[17] scales_0.2.3     ggplot2_0.9.3.1  rJava_0.9-4     

loaded via a namespace (and not attached):
 [1] dichromat_2.0-0    digest_0.6.3       gtable_0.1.2       labeling_0.1      
 [5] munsell_0.4        proto_0.3-10       RColorBrewer_1.0-5 reshape2_1.2.2    
 [9] stringr_0.6.2      tools_3.0.1       
> 


Ian Fellows

unread,
Jun 20, 2013, 2:30:55 AM6/20/13
to ded...@googlegroups.com
I am actively working on a general solution to errors like this. In the mean time delete the hidden JGR preferences located in your home directory (named something like .JGRPrefsrc and .JGREditorPrefsrc). Then install JGR into your site library (the one staring in c:\Program Files\R). Double click on the launcher to start JGR.


ian

mspin...@gmail.com

unread,
Jun 21, 2013, 2:07:41 PM6/21/13
to ded...@googlegroups.com
Thank you Ian.

I didn´t find the files that you mention.

Best,

Manuel

genk...@gmail.com

unread,
Jun 24, 2013, 1:03:56 PM6/24/13
to ded...@googlegroups.com, mspin...@gmail.com
I'm getting the same "Non-existent directory specified in --libpath=." error.  Session info is as follows:

> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
 
locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    
 
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
 
other attached packages:
[1] JGR_1.7-16   iplots_1.1-6 JavaGD_0.6-1 rJava_0.9-5 
 
loaded via a namespace (and not attached):
[1] png_0.1-5   tools_3.0.1

I'm stretching here, but might it be related to the directory specification not having DOS-friendly names?  To wit:

set R_HOME=C:\PROGRA~1\R\R-30~1.1
set R_LIBS=C:\Program Files\R\R-3.0.1\library
set R_LIBS_USER=C:\Program Files\R\R-3.0.1\library
jgr-1_62-x64.exe --rhome=C:\PROGRA~1\R\R-30~1.1 --libpath=C:\Program Files\R\R-3.0.1\library

After I changed all the folder names to DOS-type ones (e.g. Program Files --> PROGRA~1) I could execute them from a command prompt without getting the "Non-existent directory..." error.  What I did get, however, was a "JGR Installer - ERROR" tell me that "package 'iWidgets' is not available (for R version 3.0.1)".

Ideas?

Kevin Stanford
Cincinnati, Ohio, USA

Ian Fellows

unread,
Jun 26, 2013, 2:12:27 AM6/26/13
to ded...@googlegroups.com
Sorry for the delay on getting to this thread.

yes, put quotes around the paths with spaces in them.

Try the following:
1. open R and run (you may need to log in as an administrator):
install.packages(c("rJava","iplots","JGR","Deducer","JavaGD"),lib="C:/Program Files/R/R-3.0.1/library")

2. Try double clicking on jgr-1_62-x64.exe. If you get an error GOTO 3.

3. delete the hidden preference .JGRprefsrc and .JGREditorprefsrc in your home directory. These will not be visible, so you'll need to delete them using the command prompt. Open the command prompt (you should default to being in your home directory) and run
rm .JGRprefsrc
rm .JGREditorprefsrc

As I mentioned, I'm working on a more general solution which will hopefully be available in the near future.


ian

mspin...@gmail.com

unread,
Jun 27, 2013, 10:47:02 AM6/27/13
to ded...@googlegroups.com
I tried this and it didn´t work.

Best,

Manuel

Kevin Stanford

unread,
Jun 27, 2013, 11:37:37 AM6/27/13
to ded...@googlegroups.com
Ian -

I got JGR to run just now following steps 1 and 2 -- good thing I'd already spent time tracking down jgr-1_62-x64.exe in my user directory. :)  Deducer is also running under JGR -- so far, so good.

It's worth noting that I've had some Java issues the past few days.  I ended up uninstalling all JRE versions on my machine, then reinstalling JRE 6 u34 (32-bit) and JRE 7 u25 (64-bit).  (I need that version of 32-bit Java to run Business Objects, unfortunately.)

Are you recommending that I open JGR this same way every time (until the better fix comes along)?

Thanks for your help -

Kevin



You received this message because you are subscribed to a topic in the Google Groups "Deducer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deducer/kQKlRqXG8M0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deducer+u...@googlegroups.com.

Ian Fellows

unread,
Jun 27, 2013, 6:20:53 PM6/27/13
to ded...@googlegroups.com
Kevin,

You should just be able to double click on the jgr executable now to open jgr. Regarding Java, the launcher has a problem when there is a missmatch between 32/64 bit java and 32/64 bit R, so I recommend having both installed.


Manuel,

I'll contact you off list when I get a new launcher ready for testing. In the mean time to help you, and to help me in debugging, can you try the following.

1. make sure you have java installed.
2. open R in c:\Program Files\R\R-3.0.1\bin\i386\Rgui.exe and run:
install.packages(c("rJava","iplots","JGR","Deducer","JavaGD"))
.libPaths()
library(JGR)
launchJGR <- function(){
windows <- .Platform$OS.type == "windows"
ws <- function(s){
if(windows) gsub("/","\\\\",s) else s
}
ps <- if(windows) ";" else ":"
qs <- function(s){
paste0("\"" , s , "\"")
}
rhome <- ws(R.home())
libs <- ws(paste(.libPaths(),collapse=ps))
libUser <- ws(Sys.getenv("R_LIBS_USER"))
arch <- sessionInfo()$R.version$arch
rJavaPath <- ws(path.package("rJava"))
jriJarPath <- ws(paste0(path.package("rJava") , "/jri/JRI.jar"))
jgrJarPath <- ws(paste0(path.package("JGR") , "/java/JGR.jar"))
iplotsJarPath <- ws(paste0(path.package("iplots") , "/java/iplots.jar"))
boot <- ws(paste0(rJavaPath,"/java/boot"))
javaHome <- J("java.lang.System")$getProperty("java.home")
java <- ws(paste0(javaHome,"/bin/java.exe"))
path <- J("java.lang.System")$getProperty("java.library.path")

cp <- paste(qs(jriJarPath), qs(iplotsJarPath), qs(jgrJarPath),
qs(paste0(rhome , ws("/etc/classes"))),
qs(paste0(rhome , ws("/etc/classes/classes.jar"))),sep=ps)

Sys.setenv(PATH=path)
Sys.setenv(R_HOME=rhome)
Sys.setenv(R_ARCH=arch)
Sys.setenv(R_LIBS=libs)
Sys.setenv(R_LIBS_USER=libUser)
cmd <- paste0(qs(java), " -Xmx512m ", " -cp ", qs(boot),
" -Drjava.class.path=", cp,
" -Drjava.path=",qs(rJavaPath),
" -Dmain.class=org.rosuda.JGR.JGR "," -Djgr.load.pkgs=yes ",
" -Djgr.loader.ver=1.7", " -Dr.arch=",arch,
" RJavaClassLoader")
system(cmd,wait=FALSE)
cmd
}
launchJGR()

3. If that doesn't work, open R in c:\Program Files\R\R-3.0.1\bin\x64\Rgui.exe and run the same code.

Send me the full output (i.e. copy the whole R session) off list to i...@fellstat.com.

best,
Ian



Kevin Stanford

unread,
Jun 27, 2013, 10:23:24 PM6/27/13
to ded...@googlegroups.com
Thank you, sir.  Deducer is off and running -- now to get caught up on the my work. :)

Kevin



mspin...@gmail.com

unread,
Jun 30, 2013, 9:41:56 AM6/30/13
to ded...@googlegroups.com, i...@fellstat.com
Thank you Ian.

It works now.

Best,

Manuel

depaolis...@gmail.com

unread,
Nov 7, 2013, 4:26:34 PM11/7/13
to ded...@googlegroups.com, i...@fellstat.com
I'm running R 3.0.2 and get an error message " Error in path.package("rJava") : none of the packages are loaded" after running the script above. (It worked fine when I had R 3.0.1)...any hints??
Reply all
Reply to author
Forward
0 new messages