R: using package by unzipping it instead of instal

2019-06-24 03:49发布

问题:

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

回答1:

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.



回答2:

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).



标签: r package