Installing tabulizer package in R
Asked Answered
A

1

3

I am using R version 3.4.0. My PC is 64 bit windows 10.

I wanted to extract dataframes from PDF documents in R.

I tried to install tabulizer package using github but i am getting the following error.

> ghit::install_github(c("ropenscilabs/tabulizerjars", "ropenscilabs/tabulizer"), INSTALL_opts = "--no-multiarch")
also installing the dependencies ‘httpuv’, ‘sourcetools’

also installing the dependency ‘rJava’

ropenscilabs/tabulizerjars     ropenscilabs/tabulizer 
                        NA                         NA 
There were 14 warnings (use warnings() to see them)
> library("tabulizer")
Error in library("tabulizer") : there is no package called ‘tabulizer’

The warnings were as follows,

> warnings()
Warning messages:
1: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\akshay\Documents\R\win-library\3.4" C:\Users\akshay\AppData\Local\Temp\Rtmp6RtCtU/downloaded_packages/httpuv_1.3.3.tar.gz' had status 1
2: In utils::install.packages(suggests, type = type, repos = repos,  ... :
  installation of package ‘httpuv’ had non-zero exit status
3: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\akshay\Documents\R\win-library\3.4" C:\Users\akshay\AppData\Local\Temp\Rtmp6RtCtU/downloaded_packages/sourcetools_0.1.6.tar.gz' had status 1
4: In utils::install.packages(suggests, type = type, repos = repos,  ... :
  installation of package ‘sourcetools’ had non-zero exit status
5: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\akshay\Documents\R\win-library\3.4" C:\Users\akshay\AppData\Local\Temp\Rtmp6RtCtU/downloaded_packages/shiny_1.0.3.tar.gz' had status 1
6: In utils::install.packages(suggests, type = type, repos = repos,  ... :
  installation of package ‘shiny’ had non-zero exit status
7: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\akshay\Documents\R\win-library\3.4" C:\Users\akshay\AppData\Local\Temp\Rtmp6RtCtU/downloaded_packages/miniUI_0.1.1.tar.gz' had status 1
8: In utils::install.packages(suggests, type = type, repos = repos,  ... :
  installation of package ‘miniUI’ had non-zero exit status
9: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\akshay\Documents\R\win-library\3.4" C:\Users\akshay\AppData\Local\Temp\Rtmp6RtCtU/downloaded_packages/rJava_0.9-8.tar.gz' had status 1
10: In utils::install.packages(to_install, type = type, repos = repos,  ... :
  installation of package ‘rJava’ had non-zero exit status
11: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\akshay\Documents\R\win-library\3.4" C:\Users\akshay\AppData\Local\Temp\Rtmp6RtCtU/ghitdrat/src/contrib/tabulizerjars_0.9.2.tar.gz' had status 1
12: In utils::install.packages(to_install, type = type, repos = repos,  ... :
  installation of package ‘tabulizerjars’ had non-zero exit status
13: running command '"C:/PROGRA~1/R/R-34~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\akshay\Documents\R\win-library\3.4" C:\Users\akshay\AppData\Local\Temp\Rtmp6RtCtU/ghitdrat/src/contrib/tabulizer_0.1.24.tar.gz' had status 1
14: In utils::install.packages(to_install, type = type, repos = repos,  ... :
  installation of package ‘tabulizer’ had non-zero exit status
Ahola answered 10/5, 2017 at 6:0 Comment(4)
It doesn't look like there's enough info there to know what the problem is. After trying to install you should call warnings() like the error message suggests and see if it gives additional info.Fribourg
I've included warnings in my question nowAhola
Okay, it looks like basically none of the needed packages installed correctly, so something is definitely going wrong. Do you have Rtools installed? You should probably try installing some things one at a time like install.packages("httpuv") to isolate the problems.Fribourg
The problem is resolved. I individually installed all the packages in the warnings section and then later i installed tabulizer. Now it's working fine. Thanks Marius!Ahola
W
5

Most of the problems are cost by the 64 bit setting in your R session. If you want to use ‘tabulizer’ set the R session to 32 bit. If you are running a GUI, change the setting in there is the easiest way. If you are using e.g. R-studio see https://support.rstudio.com/hc/en-us/articles/200486138-Using-Different-Versions-of-R.

After that run

install.packages("remotes") # get Package if you don’t have it

library(remotes)

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

If this results in errors install the packages one by one

install.packages("plyr") # get Package if you don’t have it

library(plyr)

packs <- c('stringi', 'httpuv', 'digest', 'htmltools', 'sourcetools', 'evaluate', 'markdown', 
           'stringr', 'yaml', 'rJava', 'testthat')

laply(packs, function(x){
  install.packages(x)  
  readline(prompt="Press [enter] to continue")
}
  )

If there are errors post them on Stack. If none of the packs gives an error (therefore the Press [enter] to continue), you can install tabulizer with

remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch", dependencies = c("Depends", "Imports"))
Wayfaring answered 27/7, 2017 at 10:19 Comment(2)
This returns: leeper/tabulizerjars leeper/tabulizer NA NA Warning messages: 1: In utils::install.packages(to_install, type = type, repos = repos, : installation of package ‘tabulizerjars’ had non-zero exit status 2: In utils::install.packages(to_install, type = type, repos = repos, : installation of package ‘tabulizer’ had non-zero exit statusGalvano
Try this ghit::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer")) . On GitHub ( github.com/ropensci/tabulizer#installation ) there is also an Installation section, inparticular the ( github.com/ropensci/… ) section, because most of the instalation problems are caused by Java.Wayfaring

© 2022 - 2024 — McMap. All rights reserved.