简体   繁体   中英

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\╴49\\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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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