Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R: using package by unzipping it instead of installing it

Tags:

package

r

I am trying to use a package which can not run at such in window Rgui. The website of the package suggests for unzip and use the function

http://mouse.cs.ucla.edu/emma/install.html

But I did not way to find where I can find the function that I can enter in my R console and use it.

Help appreciated

EDITS:

RGUi that comes with windows distribution

Packaged useed is: emma, can be downloaded from the above website

like image 662
jon Avatar asked Oct 26 '11 16:10

jon


People also ask

Why I Cannot install package in R?

Changing the configuration in R Studio to solve install packages issue. Go To Tools -> Global option -> Packages. Then uncheck the option “Use secure download method for HTTP”. For other RStudio issues refer to official Troubleshooting Guide here.

How do I install R packages from a zip file?

Go into R, click on Packages (at the top of the R console), then click on "Install package(s) from local zip files", then find the zip file with arm from wherever you just saved it. Do the same thing to install each of the other packages you want to install.

What is the correct way to install the packages in R?

Open R via your preferred method (icon on desktop, Start Menu, dock, etc.) Click “Packages” in the top menu then click “Install package(s)”. Choose a mirror that is closest to your geographical location. Now you get to choose which packages you want to install.

Do I have to install packages every time I open R?

You only need to install packages the first time you use R (or after updating to a new version). **R Tip:** You can just type this into the command line of R to install each package. Once a package is installed, you don't have to install it again while using the version of R!


2 Answers

And the all-R, mouse-free version (I was almost there Roman!):

    download.file("http://mouse.cs.ucla.edu/emma/emma_1.1.2.tar.gz",
        destfile=paste(getwd(),"/emma/emma_1.1.2.tar.gz",sep=""))
    untar(paste(getwd(),"/emma/emma_1.1.2.tar.gz",sep=""), compressed = "gzip")
    source(paste(getwd(),"/emma/R/emma.R",sep=""))

wherein a new directory (emma/) will be created in your present working directory.

like image 178
tim riffe Avatar answered Sep 22 '22 07:09

tim riffe


You can download the .tar.gz file and use untar function. I've moved the file in question to my Q drive in folder emma and ran the following command. The result was extracted to a folder called emma under my working directory.

untar("q:/emma/emma_1.1.2.tar.gz", compressed = "gzip")

After you've done that, you can source the .R files (see comments under your question).

like image 38
Roman Luštrik Avatar answered Sep 21 '22 07:09

Roman Luštrik