4

I had a script working with tabulizer, but had to clean my hard drive and reinstall R, and now I cant seem to even download and access the tabulizer library. I am now using R version 4.1.2 64 bit, and am thinking maybe I need to use an earlier version of R??? Here is the error message I get when I try and install tabulizer.

install.packages("tabulizer")
Installing package into ‘C:/Users/cdonner/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘tabulizer’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

I have tried to go to go to Cran (https://cran.r-project.org/src/contrib/Archive/tabulizer/) and download and unzip the libraries to my directory, but then I get an errors again. Any ideas? Thanks.

dunbar111
  • 185
  • 1
  • 8
  • Try GitHub version https://github.com/ropensci/tabulizer – Tung Nov 19 '21 at 14:45
  • 1
    @Tung - Using the below line of code which was in the readme file in the github repo made it work!: remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch") Thanks! – dunbar111 Dec 15 '21 at 13:57

4 Answers4

10

Enter this into the command window!

remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")
dunbar111
  • 185
  • 1
  • 8
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 15 '21 at 14:00
  • Hi I also have this problem but this solution is not working for me. I am also using 4.1.2 64 bit. – Benj Young Jan 26 '22 at 23:48
2

It is not on CRAN. You have to install using

ghit::install_github("ropensci/tabulizer") 

or

devtools::install_github("ropensci/tabulizer")

github

iMSQ
  • 21
  • 4
2

I have just come to dealing with the same problem, but I got to solve it through the following steps:

  1. the tabulizer package requires a Java environment. You need to download Java 64-bit or Java 32-bit through.
    Make sure before that your windows/ mac is 32 bit or 64 bit by using the function sessionInfo().

  2. Install the rJava package in R.

  3. Create the Java environment through the command: Sys.setenv(JAVA_HOME="C:/Program Files/Java/jdk-18/")

Attention: the path of the file in step 3 is for java 64. the path for java 32 would be Sys.setenv(JAVA_HOME="C:/Program Files (x86)/Java/jdk-18/").
The other thing is that jdk-18 changes depending on everylaptop, in my case it is jdk-18, in your case it could jdk-17 for example.

  1. Finally activate the library: library(rJava)

  2. Voila. rJava and tabulizer work smoothly and nicely.

Donald Seinen
  • 4,179
  • 5
  • 15
  • 40
Anas116
  • 797
  • 2
  • 9
1

Got the same problem. (A lot) Packages were missing

  • I had to update R
  • Install java for R
  • Install Rtools42 from CRan
  • Install remotes

before running the command of @Dunbar111

remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"), INSTALL_opts = "--no-multiarch")
gros chat
  • 11
  • 2