tabulapdf icon indicating copy to clipboard operation
tabulapdf copied to clipboard

Not loading in R

Open leopoldinho opened this issue 8 years ago • 7 comments

Hi, I confess I'm not an expert R user but I seem to have some problems in installing Tabulizer in R.

I'm using R Studio and working in a 64bit Windows environment.

I tried loading the package using this line (as I had seen in another thread):

ghit::install_github(c("leeper/tabulizerjars", "leeper/tabulizer"), INSTALL_opts = "--no-multiarch", dependencies = c("Depends", "Imports"))

And that is what I got as an answer:

leeper/tabulizerjars leeper/tabulizer NA NA Warning messages: 1: running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" CMD INSTALL --no-multiarch -l "C:\Users...\Documents\R\win-library\3.3" C:\Users...\AppData\Local\Temp\RtmpeML0Qt/ghitdrat/src/contrib/tabulizerjars_0.9.2.tar.gz' had status 1 2: In utils::install.packages(to_install, type = type, repos = repos, : installation of package ‘tabulizerjars’ had non-zero exit status 3: running command '"C:/PROGRA~1/R/R-33~1.0/bin/x64/R" CMD INSTALL --no-multiarch -l "C:\Users...\Documents\R\win-library\3.3" C:\Users...\AppData\Local\Temp\RtmpeML0Qt/ghitdrat/src/contrib/tabulizer_0.1.24.tar.gz' had status 1 4: In utils::install.packages(to_install, type = type, repos = repos, : installation of package ‘tabulizer’ had non-zero exit status

Could you help me with that?

Thanks in advance.

leopoldinho avatar Apr 05 '17 10:04 leopoldinho

@leopoldinho A couple of general suggestions:

  • ghit::install_github(c("leeper/tabulizerjars", "leeper/tabulizer"), INSTALL_opts = "--no-multiarch", verbose = TRUE) will give you some more details on what is failing.
  • Make sure rJava is installed first, that seems to be causing problems for some people.
  • The png package also seems to cause problems on some platforms, so I would recommend trying to install that first, too.

leeper avatar Apr 05 '17 13:04 leeper

Thanks for your answer. I think the problem is indeed with rJava which seems not to work even if I install it first.

That's what the error message I get (part of it).

  • installing source package 'tabulizerjars' ... ** R ** inst ** preparing package for lazy loading Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures. ERROR: lazy loading failed for package 'tabulizerjars'
  • removing 'C:/Users/Raffo/Documents/R/win-library/3.3/tabulizerjars' ERROR: dependency 'tabulizerjars' is not available for package 'tabulizer'
  • removing 'C:/Users/Raffo/Documents/R/win-library/3.3/tabulizer'

I've seen elsewhere on the web that this seems to be a pretty common problem with that package. Any suggestion on how to fix it?

Thanks a lot for any help.

leopoldinho avatar Apr 05 '17 16:04 leopoldinho

It might be your JAVA_HOME environment variable. Try something like Sys.setenv(JAVA_HOME = "C:/Program Files/Java/jdk1.8.0_92") maybe?

leeper avatar Apr 05 '17 16:04 leeper

Thanks for the suggestion but even that doesn't seem to work for me, unfortunately

leopoldinho avatar Apr 07 '17 20:04 leopoldinho

@leopoldinho - Were you able to get around the issue? I get the same error while trying to install tabulizer. I am able to install rJava though.

Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures. ERROR: lazy loading failed for package 'tabulizerjars'

aayush-nangru avatar Jul 04 '17 09:07 aayush-nangru

No, unfirtunately I could not solve the problem and had to give up Tabulizer

leopoldinho avatar Jul 05 '17 08:07 leopoldinho

Ah okay. Thanks for your response.

aayush-nangru avatar Jul 05 '17 08:07 aayush-nangru