Cannot install openNLPdata Package on R Studio 1.3.1093-1

Hi there,

I'm very new to R Studio, and have encountered it for the first time for a class within my MBA coursework. I am currently having, and have been for about a week now, an issue regarding installing the openNLPdata package in R Studio Version 1.3.1093-1. I have uninstalled R Studio and R Tools, downloaded countless versions, uninstalled everything R-related on my computer, and cannot overcome this issue. If someone could please tell me which version of R Studio is compatible with the openNLPdata package, I would be greatly appreciative. I should note that the NLP and openNLP packages install without any issue. I've attached the code I'm trying to run (and the results) below:

install.packages('NLP')
install.packages('openNLP')
install.packages('openNLPdata', repos='http://datacube.wu.ac.at/', type='source')

Results:

install.packages('openNLPdata', repos='http://datacube.wu.ac.at/', type='source')
Installing package into ‘C:/Users/don't know/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘openNLPdata’ 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
(cran website, had to delete link because new users are only allowed 2).

Things I have tried:

  1. installing the rJava package
  2. writeLines('PATH="{RTOOLS40_HOME}\\usr\\bin;{PATH}"', con = "~/.Renviron")
    2a. Sys.which("make") ## "C:\rtools40\usr\bin\make.exe"
    2b. install.packages('openNLPdata', repos='redacted link (new user limited to 2)', type='source')
  3. Wiped my computer of all versions of R Studio and R Tools
  4. Played a guessing game of running the code within multiple versions of R Studio to no avail

As you can imagine, I am quite frustrated. I'm sure the fix is simple in nature, but for me it is not. I am simply trying to pull some text from Reddit for a class and have been at this for over a week. I've spoken with my professor, TA, and even paid tutors. My last effort is turning to the R Studio community for help. Anything at all is much appreciated. Thank you and stay safe.

Choose a different CRAN repository, RStudios repository is a good choice (http://cran.rstudio.com/) or you could choose one that is geographically closer to you.

The package is on CRAN and there is a binary for Windows so no need to install from source.

Is this your actual username? R has problems with non-ASCII characters in windows user names, you can either change it to something safer or you can install into the system-level package library instead.

You can change the defaul library path by setting your R_LIBS_SITE environmental variable on a .Reviron or .Rprofile file

# In .Renviron file you can set it by adding this line
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.3\\library"

For a more detailed explanation, you can read this blog post

Yes it is my actual username. I'm not sure on how to change it as this computer was given to me. I'm sure you can tell that I'm not really qualified to be working with R and am in over my head. After trying your fix I received the same error code and am unsure of what to do at this point.

If you are getting the same error, then you haven't changed your library path successfully. Since you are not providing any more details I can only say, try again.

Well I can gladly (and shamefully) announce that I have found the root cause of the problem. I did not have the JDK for Java installed. The package installed without any issues after that.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Andres,

Thank you for your help. Unfortunately that did not work, however I did get a new error I have not seen before:

** byte-compile and prepare package for lazy loading
Error: unexpected symbol in "setwd('C:/Users/DON'TK"
Execution halted
ERROR: lazy loading failed for package 'openNLPdata'

  • removing 'C:/Users/don't know/Documents/R/win-library/4.0/openNLPdata'
  • restoring previous 'C:/Users/don't know/Documents/R/win-library/4.0/openNLPdata'
    Warning in install.packages :
    installation of package ‘openNLPdata’ had non-zero exit status

It is hard to be sure but that error message Error: unexpected symbol in "setwd('C:/Users/DON'TK"
Execution halted

suggests than andresrcs is correct and Windows is choking on the space and possibly the ' in the path. You may want to talk to a tutor or IT consultant about changing it. I am on Linux so I cannot help.

BTW does rJava load successfully when you issue the command

library(rJava)