Failed to load avro package in R - r

I have avro files in my local drive to read and i want these to be analysed through R. However this package is not getting installed. It is not available in cran so i had to download via GitHub. Here is the link:
https://github.com/RevolutionAnalytics/ravro/
I am getting the following error upon loading/installing in RStudio for this
ERROR: dependencies 'bit64', 'rjson' are not available for package 'ravro'
removing 'C:/Users/xyz/Documents/R/win-library/4.0/ravro'
Warning in install.packages : installation of package ‘C:/xyz/ravro/ravro-master/build/ravro_1.0.4.tar.gz’ had non-zero exit status
Also when i run install_github("RevolutionAnalytics/ravro") it returns the error:
"Failed to install 'unknown package' from GitHub:HTTP error 404.
Not Found Did you spell the repo owner (RevolutionAnalytics) and repo name (ravro) correctly? If spelling is correct, check that you have the required permissions to access the repo."
Can anybody test and try to install this package and if its successful please let me know !

downloading the file https://github.com/RevolutionAnalytics/ravro/blob/master/build/ravro_1.0.4.tar.gz
an than run
install.packages('path_to_tar.gz/ravro_1.0.4.tar.gz', repos = NULL, type="source")
works on my machine

Related

how to install binary package from github in R

I have an R binary package in github.
The following code does not work.
Could any one can help me to install this.
devtools::install_github('yikeshu0611/set',type = 'binary')
Greate tahnks.
for me the package doesn't exist. I checked the Repos list also for yikeshu0611 at
https://github.com/yikeshu0611?after=Y3Vyc29yOnYyOpK0MjAyMC0wMy0wMlQxMzoxNzo0OVrODpDEKg%3D%3D&tab=repositories
But there is not "nhanesR" there. Please check.
> devtools::install_github('yikeshu0611/nhanesR',type = 'binary')
Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
Not Found
Did you spell the repo owner (`yikeshu0611`) and repo name (`nhanesR`) correctly?
- If spelling is correct, check that you have the required permissions to access the repo.

syntax error near unexpected token - R package Install

I am trying to install an R package along with its dependencies. But it is throwing error.
$ install.packages(rvest_0.3.5.tar.gz, dependencies=True)
-bash: syntax error near unexpected token `rvest_0.3.5.tar.gz,'
I am new to R please help me how can I download this along with it dependencies.
Before this, I tried following
$ R CMD INSTALL rvest_0.3.5.tar.gz
* installing to library ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library’
ERROR: dependencies ‘httr’, ‘magrittr’, ‘selectr’ are not available for package ‘rvest’
But it failed with dependent packages are missing error. And obviously it is cumbersome to install the dependent packages manually. Hence I tried package.install
You need to run it with quotes and capital TRUE:
install.packages("rvest_0.3.5.tar.gz", dependencies = TRUE)
Note this will only work if you have unix-like system and the file is located in your current working directory (check with running getwd() from your R session). Otherwise you need to provide full path to the file (like "~/somefolder/mydata/rvest_0.3.5.tar.gz").
If you run Windows, then you need .zip file instead of .tar.gz.
If you are connected to internet, just run:
install.packages("rvest")

Errors when installing specific R packages

I am receiving error messages when I try to install specific packages in R. The packages in question are pillar and osrm. I recently updated several packages without any problems so I'm not sure why these ones are causing an issue.
The error message I recieve when installing either of the two packages is as follows:
There is a binary version available but the source version is later:
binary source needs_compilation
osrm 3.2.0 3.3.1 FALSE
installing the source package ‘osrm’
trying URL 'https://cran.rstudio.com/src/contrib/osrm_3.3.1.tar.gz'
Content type 'application/x-gzip' length 119746 bytes (116 KB)
downloaded 116 KB
'\\CompanyX\ProgData\R_Studio\R-34~1.1' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"X:/R_Studio/R-34~1.1/bin/i386/R" CMD INSTALL -l "X:\R_Studio\R-3.4.1\library" C:\Users\abc123\AppData\Local\Temp\RtmpKk0RxD/downloaded_packages/osrm_3.3.1.tar.gz' had status 1
Warning in install.packages :
installation of package ‘osrm’ had non-zero exit status
I have seen in other posts that the binary/source issue is caused by recent updates to the package and this requires a compiler. As I am on a company machine, I am unable to easily install RTools. I have also installing tried older versions of each package - this results in the same error.
I have tried to download from Github directly via devtools::install_github("rCarto/osrm") but I always get the following error:
Installation failed: Failed to connect to raw.githubusercontent.com port 443: Timed out
I'm not sure if this is due to a company firewall blocking the access, but it seems to occur with any package I try to download from GitHub.
Finally, I have tried to install directly from the tar.gz file or a zip file downloaded from CRAN/GitHub. The former results in the following error:
'\\CompanyX\ProgData\R_Studio\R-34~1.1' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"X:/R_Studio/R-34~1.1/bin/i386/R" CMD INSTALL -l "X:\R_Studio\R-3.4.1\library" "C:/Users/abc123/AppData/Local/Temp/RtmpKk0RxD/downloaded_packages/osrm_3.3.1.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘C:/Users/abc123/AppData/Local/Temp/RtmpKk0RxD/downloaded_packages/osrm_3.3.1.tar.gz’ had non-zero exit status
While the zip file route does place the package folder in the R root library folder but then results in a system error requesting the latest version of R and then crashes RStudio completely.
Any advice as to either successfully install these packages or a specific issue I could raise with the company IT department would be much appreciated.

Sentiment Analysis using R: github 'okugami79/sentiment140' package installation error

I wish to install sentiment140 github package by developer okugami79. I wrote following script for the same:
install.packages("githubinstall")
require(devtools)
library(githubinstall)
install_github('sentiment140', 'okugami79')
library(sentiment)
But it threw an error:
Installation failed: Failed to connect to raw.githubusercontent.com port 443: Timed out
Warning message: Username parameter is deprecated. Please use okugami79/sentiment140
Then I modified installation statement as follows:
install_github('okugami79/sentiment140')
Still it threw an error:
Installation failed: Failed to connect to raw.githubusercontent.com port 443: Timed out
I checked for solution on stackoverflow through following link:
Timeout R package installation from Github
Here, I found a way to install github package by downloading package zip file and installing it in R using:
install.packages("/address/to/zip-package", repos = NULL, type="source")
This also prompts error:
Warning: invalid package 'sentiment-master'
Error: ERROR: no packages specified
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\u257449\Documents\R\win-library\3.3" "sentiment-master"' had status 1
Warning in install.packages : installation of package ‘sentiment-master’ had non-zero exit status
How should I go about installing required package from github in R ? Your valuable advice/solution is requested.
Thank You !
Just a straightforward pair of functions installed this package from Github source for me on both Windows and OSX.
install.packages("devtools")
devtools::install_github('okugami79/sentiment140')
There may be something unusual about your system setup, in which case, it would be helpful to have your session information. You can get that by entering sessionInfo().
However, note that this package you are looking to install is over 4 years old per the description file on Github. A lot of work has gone into other packages that work with natural language processing and sentiment analysis. The CRAN Task View for Natural Language Processing is a good place to start for an overview of many of these packages that can be installed directly from CRAN. There are many resources that are better maintained. For example, here's a chapter on sentiment analysis using the tidytext package.

cannot install R package using install_local on linux server

I have been trying to install "ncdf4" package in R locally for more than two days now. First I tried installing "ncdf4" package with package.install() but it did not work. Afterwards, I downloaded binary file of the package and tried installing it using install_local:
> library("devtools")
> install_local("/path to the package/",quiet=FALSE)
However, this generated following error:
Installation failed: cannot open the connection
Warning message:
In read.dcf(path) :
cannot open compressed file
'/<path_to_the package>/DESCRIPTION', probable reason 'Not a directory'
I also could not install some other packages using install_local(). Can anyone help me out in troubleshooting this error?

Resources