Installing the R package ‘SocialMediaLab’ in 2021

‘SocialMediaLab’ is a cool R package for collecting data (posts/comments) from social media including Twitter, FB and YouTube to conduct sentiment analysis with. The package, however, is no longer downloadable through the package installer and gave me the opportunity

‘SocialMediaLab’ is a cool R package for collecting data (posts/comments) from social media including Twitter, FB and YouTube to conduct sentiment analysis with. The package, however, is no longer downloadable through the package installer but can still be found in the cran repository.

All you have to is to install it manually, or on R using the following command:

install.packages(“http://cran.nexr.com/src/contrib/SocialMediaLab_0.23.2.tar.gz", repos=NULL, method=”libcurl”)

If all goes well, you should see the following:

> install.packages("http://cran.nexr.com/src/contrib/SocialMediaLab_0.23.2.tar.gz", repos=NULL, method="libcurl")
Installing package into ‘/Users/user/Library/R/3.6/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.nexr.com/src/contrib/SocialMediaLab_0.23.2.tar.gz'
Content type 'application/x-gzip' length 75646 bytes (73 KB)
==================================================
downloaded 73 KB
* installing *source* package ‘SocialMediaLab’ ...
** package ‘SocialMediaLab’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Note: break used in wrong context: no loop is visible
Note: break used in wrong context: no loop is visible
Note: break used in wrong context: no loop is visible
Note: break used in wrong context: no loop is visible
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (SocialMediaLab)

If this doesn’t work, there might be another way to do it:

install.packages("https://mran.microsoft.com/snapshot/2017-02-04/src/contrib/SocialMediaMineR_0.4.tar.gz", repos=NULL, method="libcurl")

Now load the package and enjoy!

Epidemiologist and data analyst by profession, photographer and writer by passsion…