install packages from local tar.gz file in linux

Dason

Ambassador to the humans
#2
If you have all the dependencies met you could install from the command line using R CMD INSTALL yourfile.tar.gz

If not you could from within R do something like
Code:
install.packages("yourfile.tar.gz", repos = NULL)
but I'm just going off of memory so these things might need to be tweaked.
 
A

amintc

Guest
#3
yes, it is. but install.packages has a other Arguments and I unknown in use them!!! please give me a sample
 

Dason

Ambassador to the humans
#4
install.packages has a lot of other arguments. You don't necessarily need to provide parameters for all the arguments. How about instead of me providing a sample for you - you just tell me what package you're trying to install and if it doesn't work what the error is.
 
A

amintc

Guest
#5
install.packages("zoo.tar.gz", repos = NULL)
-----------------------------error-----------------------
Installing package(s) into â/home/users/roshani/R/x86_64-unknown-linux-gnu-library/2.13â
(as âlibâ is unspecified)
Warning: invalid package âzoo.tar.gzâ
Error: ERROR: no packages specified
Warning message:
In install.packages("zoo.tar.gz", repos = NULL) :
installation of package 'zoo.tar.gz' had non-zero exit status
 

Dason

Ambassador to the humans
#6
Is your working directory where the file is stored? If not
Code:
setwd("path/to/directory/where/package/is")
# and apparently we need to add type="source"
install.packages("yourpackage.tar.gz", repos = NULL, type = "source")