Jennifer
Jennifer

Reputation: 11

Error trying to install Rling package in R

The following error occurs when I try to install the Rling package in R and RStudio:

install.packages("/Users/Jennifer/Documents/Carleton/9. F2018/LING4606/Rling_1.0.tar.gz",
                 repos = NULL, type = "source")

Error in rawToChar(block[seq_len(ns)]) : embedded nul in string: '\037\x8b\b\0\0\0\0\0\0\006\xec\xbd\005X]\u02f2.\032$\x90@\xb0\xa0\xc1!\xc1\xdd\035B\b\020\xdc!\xb8L\xdc&\xee\022<\xb8\xbb\xbb\xbb\xbb3qwww\x87\x89<\xb2\xd6\xde\xfbl\xb9\xef\x9e\xfb\xdew\xf6\xba罻\xfa\xcb$\xdd\xd5\xdd\xd5\xd5]㯪\036\xa3瘲\xa6F\xe6\006t_\005\xe5\004dE\xa4\xe5'

Warning message: In install.packages("/Users/Jennifer/Documents/Carleton/9. F2018/LING4606/Rling_1.0.tar.gz", : installation of package ‘/Users/Jennifer/Documents/Carleton/9. F2018/LING4606/Rling_1.0.tar.gz’ had non-zero exit status

Not sure what I'm doing wrong. Any advice would be appreciated.

Upvotes: 1

Views: 3537

Answers (2)

redzep66
redzep66

Reputation: 1

Adding to this thread for anyone who gets the same issue in future (as I have today):

  • There seems to be a newer version of the file on Levshina's GitHub. Whatever I tried (and I tried a lot) I couldn't get anything to work with the file I downloaded from the website quoted in the "How to do linguistics with R" book. So definitely go to the GitHub first. There's also a link to download just the .RData file if the tar.gz file doesn't work.

  • I also couldn't get install.packages command to work in the way quoted in both the book and the GitHub repository. I followed advice from this thread and another more recent thread and installed devtools:

install.packages("devtools")
library("devtools")

Then used the following:

devtools::install_local("/path/to/file/Rling_1.0.tar.gz", repos = NULL, type="source")

Obviously, replace /path/to/file with the actual file path where your tar.gz file has been saved. I say this because for many of us this is our introduction to R and possibly coding in general, so I don't want to assume what people know or don't know already.

Hopefully that saves some other poor linguist a bit of time!

Upvotes: 0

IzzyBizzy
IzzyBizzy

Reputation: 43

I had the same issue with the Rling package. I had this package installed before and had used it for years but recently updated R and RStudio and had to reinstall it. So, I am guessing that this is a bug that only affects newer versions or is related to the additional code that the author states needs to be added to install (repos = NULL, etc). Using devtools::install_local("/Users/Rling_1.0.tar.gz") worked without a problem.

Upvotes: 2

Related Questions