2

I am trying to install the following R package on my system Ubuntu 12.04 x86_64-pc-linux-gnu but it seems that my R version is higher and I am downloading a package supported on previous version...I am getting a waning:

install.packages("Spot")

Warning in install.packages :
package ‘Spot’ is not available (for R version 3.0.1)

I tried to install it from Package archive but it giving me this error

install.packages("~/Spot_3.2_x86_64.tar.gz", repos = NULL, type = "source", lib="/home/jarvis/R/x86_64-pc-linux-gnu-library/3.0")

Warning in install.packages :
package ‘~/R/workspace/Spot_3.2_x86_64.tar.gz’ is not available (for R version 3.0.1)
* installing *source* package ‘Spot’ ...
ERROR: a 'NAMESPACE' file is required
* removing ‘/home/jarvis/R/x86_64-pc-linux-gnu-library/3.0/Spot’
Warning in install.packages :
installation of package ‘/home/jarvis/R/workspace/Spot_3.2_x86_64.tar.gz’ had non-zero    exit status 

any suggestions???

Spacedman
  • 92,590
  • 12
  • 140
  • 224
JstRoRR
  • 3,693
  • 2
  • 19
  • 20
  • 3
    You have two options: Modify the package to meet the requirements of R 3.0 or install an old R version from the time when the package was last updated. – Roland Jul 16 '13 at 09:59
  • 2
    If you're up to it, modifying the package to meet the requirements of R 3.0 (i.e. add a `NAMESPACE` file) will probably be less frustrating in the long run than juggling versions of R. – Ben Bolker Jul 16 '13 at 13:06

2 Answers2

3

you can have more R installations on same computer so i would suggest downloading appropriate version if that package is important so you can use it.

NikolaB
  • 4,706
  • 3
  • 30
  • 38
2

Just adding the NAMESPACE file really helped.

Untar the package, then create a NAMESPACE file in the untarred package and write 'exportPattern(".")' save it. Then tar the package using "tar -zcf package.tar.gz package" and then try to install it. I tried with the command

install.packages("~/R/workspace/Spot.tar.gz", repos = NULL, type = "source", lib="~/R/x86_64-pc-linux-gnu-library/3.0")

and it gets installed with the follwing output:

* installing *source* package ‘Spot’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
‘Spot.Rnw’ 
** testing if installed package can be loaded
Warning: ignoring .First.lib() for package ‘Spot’
* DONE (Spot)

Thanks alot guyzz :)

JstRoRR
  • 3,693
  • 2
  • 19
  • 20