Reputation: 53
I run R on a webserver and one of the packages I use is "sentiment", an old package used for sentiment analysis. I'm not even sure its still around and/or widely used. There is a new package, "sentiment140" that I would like to use on my server, but to call it, it also uses the library(sentiment) command. How can I install and use both packages?
Upvotes: 1
Views: 198
Reputation: 181
Here is one way to do it:
I assume you have an old package already installed (e.g. the sentiment
package) and you want to install a new one with the same name. We are going to trick R
into thinking the name of the package is something else (whatever you want to call it).
DESCRIPTION
. Package:
line in this file, giving it a new package name (e.g. change Package: sentiment
to Package: sentiment2
). R CMD INSTALL package
. You should now be able to load the package using whatever name you chose above, e.g. library(sentiment2)
.
Upvotes: 0