Using a Linux only package in Windows #rstats

Here is some R code for using a R package that has only a tar.gz file available (used to load R packages in Linux) and no Zip file available (used to load R packages in Windows).

Step 1- Download the tar.gz file.

Step 2 Unzip it (twice) using 7zip

Step 3 Change the path variable below to your unzipped, downloaded location for the R sub folder within the package folder .

Step 4 Copy and Paste this in R

Step 5 Start using the R package in Windows (where 75% of the money and clients and businesses still are)

Caveat Emptor- No X Dependencies (ok!)

path="C:\\Users\\KUs\\Desktop\\segue\\R"
b=dir(path)
c=length(b)
for (i in 1:c){source(gsub(" ","",paste(path,"\\",b[i])))}
ls()

 

R2D2

Author: Ajay Ohri

http://about.me/ajayohri

One thought on “Using a Linux only package in Windows #rstats”

  1. Or you could install Rtools, and do “R CMD INSTALL *.tar.gz”, or install devtools (which uses Rtools on Windows to do installation) and do “library(devtools); install(“pathtofile.tar.gz”)”

Leave a comment