[R] install R package on Unix cluster

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Mar 18 14:40:24 CET 2012



On 18.03.2012 05:47, Lorenzo Cattarino wrote:
> Hi R users,
>
> Working from a PC, I am trying to install the spatstat package on a Unix cluster. I created the following PBS file to send a job array:
>
> #!/bin/bash -ue
>
> #PBS -m ae
> #PBS -M my email
> #PBS -J 1-45
> #PBS -A my username
> #PBS -N job name
> #PBS -l resources
> #PBS -l walltime
>
> cd $PBS_O_WORKDIR
>
> module load R/2.14.1
>
> R CMD INSTALL -l /path/to/library spatstat

This command installs *a* source package from the current subdirectory 
spatstat.

If there is no such directory containing the sources, it won't work.
Either provide the gzipped tarball and give its name or use 
install.packages("spatstat") within an R script.

It makes sense to install it outside the parallel processing into a 
common directory and just use it in parallel (It is not entirely clear 
to me if you are really running the installation on all nodes).

Uwe Ligges



>
> R CMD BATCH /path/to/folder/Script_$PBS_ARRAY_INDEX.R
>
> Obviosuly I failed to understand pag 19 of the R admin manual because I keep getting the following error message:
>
> Warning: invalid package ‘spatstat’
> Error: ERROR: no packages specified
>
> I'd appreciate if you can point me in the right direction
>
> Thanks
> Lorenzo
>
>
> 	[[alternative HTML version deleted]]
>
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list