Friday 15 June 2012

r - How to install a package not located on CRAN repository? -


I am trying to use Google Trends data and have come in some packages that are not on cron (,) Are there.

I like what I have seen from the RwdDand package, and wanted to try the RGoogleTrends package here:

First of all, I am using a Windows OS and My R Console has a Vertical:

  & gt; Package & gt; Install package (s) from local zip drive ...   

This results in the following:

  & gt; Utils ::: menuInstallLocal () error (file.path (pkgname, "DESCRIPTION"), C ("package", "type")): connection can not open Additionally: Warning message: 1: In unzip (Zipname, exdir = dest): Error 1: read.dcf (file.path (pkgname, "DESCRIPTION"), c ("package", "type") to extract from zip file: can not open compressed file 'RGoogleTrends_0.2-1.tar.gz / DESCRIPTION', the probable cause is 'no such file or directory'   

I am guessing that what to do with the file is a As is .gz and There is no .zip file.

So, I unzipped the file outside of .gz and then it zipped into a .zip file (should be a better method ) Now I can install the .zip file, but when I try and load it with the library , the following error occurs:

  & gt; Error in Library (RGoogleTrends) Library: RGoogleTrends ™ is not a valid installed package   

What am I doing wrong here?

You will need R3 version for this, which you can get here for example:

Then open R and type:

  install.packages ("devtools") is required (devtools) install_url ("http://www.omegahat.org/RGoogleTrends/RGoogleTrends_0. 2- 1.tar.gz ") are required (RGoogleTrends) ls (" Package: RGoogleTrends ")   

You can get some warnings in this process, do not pay attention to them, you should then be able to use the package.

No comments:

Post a Comment