简体   繁体   English

在 R 中安装制表器 package 时遇到问题

[英]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.我有一个使用 tabulizer 的脚本,但不得不清理我的硬盘驱动器并重新安装 R,现在我似乎什至无法下载和访问 tabulizer 库。 I am now using R version 4.1.2 64 bit, and am thinking maybe I need to use an earlier version of R???我现在正在使用 R 版本 4.1.2 64 位,我想也许我需要使用 R 的早期版本??? Here is the error message I get when I try and install tabulizer.这是我尝试安装 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. 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.它不在 CRAN 上。 You have to install using您必须使用安装

ghit::install_github("ropensci/tabulizer") 

or或者

devtools::install_github("ropensci/tabulizer")

github 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.我刚来处理同样的问题,但我必须通过以下步骤解决它: 1 - 库“tabulizer”需要 java 环境。 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(). 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. 2- 下载 java32/64 后,在 R 中安装 package rJava。

3- and then you create the java environment through the command: Sys.setenv(JAVA_HOME="C:/Program Files/Java/jdk-18/") 3-然后你通过命令创建java环境: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.注意:步骤3中文件的路径是java 64。java 32的路径是Sys.setenv(JAVA_HOME="C:/Program Files (x86)/Java/jdk-18/") jdk-18 的变化取决于每个笔记本电脑,在我的情况下它是 jdk-18,在你的情况下它可能是 jdk-17。

4- finally activate the library: library(rJava) 4-最后激活库: library(rJava)

5- and voila. 5-瞧。 you have rJava and tabulizer working smoothly and nicely.你有 rJava 和 tabulizer 工作顺利,很好。

Got the same problem.遇到了同样的问题。 (A lot) Packages were missing (很多)包裹丢失

  • I had to update R我不得不更新 R
  • Install java for R为 R 安装 java
  • Install Rtools42 from CRan从 Cran 安装 Rtools42
  • Install remotes安装遥控器

before running the command of @Dunbar111在运行@Dunbar111 的命令之前

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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