简体   繁体   中英

Having Issues installing tabulizer package in R

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.

Enter this into the command window!

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

It is not on CRAN. You have to install using

ghit::install_github("ropensci/tabulizer") 

or

devtools::install_github("ropensci/tabulizer")

github

I have just come to dealig with the same problem, but I got to solve it through the following steps: 1 - the library "tabulizer" requires a java environment. so you need to download java 64 bit or java 32 bit through this link: https://www.java.com/en/download/ you need to make sure before that your windows/ mac is 32 bit or 64 bit by using the function sessionInfo().

2- having downloaded java32/64, you install the package rJava in R.

3- and then you 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.

4- finally activate the library: library(rJava)

5- and voila. you have rJava and tabulizer working smoothly and nicely.

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")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM