0

Hi I want to install the vegan package for R via terminal command - so far I have this:

This downloads the zipped file required (this part works)

wget -O ~/file/downloads/vegan_2.3-5.tar.gz "http://download.r-forge.r-project.org/src/contrib/vegan_2.3-5.tar.gz"  

I want this to then install that package so i can run it in R (this part doesn't work error message: syntax error near unexpected token `(' )

install.packages(~/file/downloads/vegan_2.3-5.tar.gz, repos = NULL, type="source")  

Thanks in advance

  • Can you be more specific than "this part doesn't work"? it doesn't give us much to go on – steeldriver May 28 '16 at 19:04
  • Use this terminal command to install the downloaded package R CMD INSTALL vegan_2.3-5.tar.gz – rcs May 28 '16 at 19:49
  • still get error with this but now it says: * installing to library ‘/usr/local/lib/R/site-library’ ERROR: dependency ‘permute’ is not available for package ‘vegan’ * removing ‘/usr/local/lib/R/site-library/vegan’ – Giles May 28 '16 at 20:14
  • Is there a reason you can't install vegan the standard way from within R? install.packages("vegan") should automatically pull on any dependencies. – amc Jun 14 '16 at 5:47
  • i prefer to do things via the command line rather than within R, makes things easier for larger script writing and install packages etc – Giles Jul 7 '16 at 18:45
0

Okay I've got the answer, thanks rcs for the install method. Basically vegan requires previous installation of permute. So these commands do the trick:

wget -O ~/downloads/permute_0.8-3.tar.gz "http://download.r-forge.r-project.org/src/contrib/permute_0.8-3.tar.gz"
wget -O ~/downloads/vegan_2.3-5.tar.gz "http://download.r-forge.r-project.org/src/contrib/vegan_2.3-5.tar.gz"
sudo R CMD INSTALL ~/downloads/permute_0.8-3.tar.gz
sudo R CMD INSTALL ~/downloads/vegan_2.3-5.tar.gz

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.