Having Issues installing tabulizer package in R - 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 dealing with the same problem, but I got to solve it through the following steps:
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().
Install the rJava package in R.
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.
Finally activate the library: library(rJava)
Voila. rJava and tabulizer work 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")

Related

package 'lubridate' installation error: compilation failed for package 'lubridate' [duplicate]

A friend sent me along this great tutorial on webscraping The New York Times with R. I would really love to try it. However, the first step is to install a package called [RJSONIO][2] from source.
I know R reasonably well, but I have no idea how to install a package from source.
I'm running macOS (OS X).
If you have the file locally, then use install.packages() and set the repos=NULL:
install.packages(path_to_file, repos = NULL, type="source")
Where path_to_file would represent the full path and file name:
On Windows it will look something like this: "C:\\RJSONIO_0.2-3.tar.gz".
On UNIX it will look like this: "/home/blah/RJSONIO_0.2-3.tar.gz".
Download the source package, open Terminal.app, navigate to the directory where you currently have the file, and then execute:
R CMD INSTALL RJSONIO_0.2-3.tar.gz
Do note that this will only succeed when either: a) the package does not need compilation or b) the needed system tools for compilation are present. See: R for Mac OS X
You can install directly from the repository (note the type="source"):
install.packages("RJSONIO", repos = "http://www.omegahat.org/R", type="source")
A supplementarily handy (but trivial) tip for installing older version of packages from source.
First, if you call "install.packages", it always installs the latest package from repo. If you want to install the older version of packages, say for compatibility, you can call install.packages("url_to_source", repo=NULL, type="source"). For example:
install.packages("http://cran.r-project.org/src/contrib/Archive/RNetLogo/RNetLogo_0.9-6.tar.gz", repo=NULL, type="source")
Without manually downloading packages to the local disk and switching to the command line or installing from local disk, I found it is very convenient and simplify the call (one-step).
Plus: you can use this trick with devtools library's dev_mode, in order to manage different versions of packages:
Reference: doc devtools
From CRAN, you can install directly from a GitHub repository address. So if you want the package at https://github.com/twitter/AnomalyDetection, using
library(devtools)
install_github("twitter/AnomalyDetection")
does the trick.
In addition, you can build the binary package using the --binary option.
R CMD build --binary RJSONIO_0.2-3.tar.gz

Tidyverse not installing

I'm having a bit of a pickle right now with the package tidyverse, that I need for an assignment on layering maps. I tried installing the package using install.packages("tidyverse") and install.packages ("tidyverse", dependencies = TRUE) but when I ran library(tidyverse) it wasn't installed. I searched online and found that I had an older version of RStudio IDE so I uploaded the latest version (1.3.1056).
After installing the newest version, I reinstalled the package but R tells me the following:
"Rtools is required to build R packages but is not currently
installed".
So, I did it, but the R tells me Rtools package is not available for R version 3.5.3.
What can I do to use tidyverse?
It could be a permissions issue, try setting the directory for where you install R packages/libraries on your computer using libpaths. I have to do this on my work laptop because the university has it set up to store things like this in a tempporary directory on the remote server which isn't desirable.
.libPaths("C:/R")
.libPaths()

How to install MVPARTwrap package in R version 3.6.1?

I am trying to install mvpart and MVPARTwrap packages in R version 3.6.1.
I install on my PC the folder of these two packages in zip version and load them in the relative folder of the package.
When I run the script library(mvpart) I get this message:
ERROR: 'mvpart' package was built before R 3.0.0: please reinstall it."
I try to load this library in the old version of R (version 2.15) and the message is
in install.packages (mvpart): object 'mvpart' not found".
I do not understand why it is impossible to load this package. Thanks so much.
Maybe the answer is no more relevant, but I just had to install those libraries so maybe it will still help someone later. I suggest the install from github as it will install dependencies, you need however to be able to compile the source. So here we go :
first install rtools if it is not already installed go here and follow the instruction
update/install devtools if necessary as described here
using this command, it should work now. you may be asked to update some packages, accept all
devtools::install_github("cran/mvpart")

install RMySQL for Mac

I get below error when I try to install Mysql package (MAC OS)
install.packages('RMySQL')
package ‘RMySQL’ is available as a source package but not as a binary
Warning in install.packages :
package ‘RMySQL’ is not available (for R version 3.1.0)
I am not sure what I need to set in order for this to work.
The author of RMySQL no longer provide binary packages, so you will have to build from source.
I have posted the complete solution in another thread: Installing RMySQL in mavericks.
Basically, in order for install.packages('RMySQL', type='source') to work correctly, what you are lacking are:
Make sure you have "gcc" available.
Install MySQL client somewhere, e.g., via Homebrew.
Configure and build RMySQL from source in RStudio or in Terminal:
Set the 2 environment variables PKG_CPPFLAGS and PKG_LIBS to indicate where the include and lib are.
Run install.packages('RMySQL', type='source') in RStudio or R CMD INSTALL RMySQL_x.x-x.tar.gz in Terminal
Installing from source worked well for me. For those who are new to R, the way to install from source is:
install.packages('RMySQL', type='source')

How to install BigMemory and bigrf on windows OS

I have been trying to install bigmemory on my R installation.
My OS is windows 7 64 bit and I have tried it on R V2.15.1,2.15.2 and 3.0.1 64 bit but I cant get it to work.
I have tried several options
download the current source and run the command in R v3.0.1
install.packages("D:/Downloads/bigmemory_4.4.3.tar.gz", repos =
NULL, type="source")
but this gives an error "ERROR: Unix-only
package"
download older sources and run a similar commands, in the various
installations of R V2 V3 etc,
This gives me an error "ERROR:
configuration failed for package 'bigmemory'"
Any ideas? I am actually trying to install bigrf but bigmemory seems to be a dependency. Is there any workaround for this?
Many thanks
Seems the github version installs OK on Windows:
install.packages(c("BH","biglm"))
library(devtools)
devtools::install_github('kaneplusplus/bigmemory')
library(bigmemory)
the package authors told me they are fixing the CRAN one to work on Windows again too.
Going to the CRAN page here, shows you that you have to compile the sources on windows. Google how to do it or look at official document : here
Of course if package A depends on B you have to install B before A yourself.
EDIT: actually it says OS_type : unix

Resources