[R-sig-Geo] Material for asdar book

Agustin Lobo Agustin.Lobo at ija.csic.es
Fri Jan 2 20:29:51 CET 2009


The script worked great, thanks. The problem is thus
solved for me, but may be windows users
will not be able to run it. Perhaps a line creating a tar or
zip file could be added to the script, and then upload that
tar file to the web page could also be done automatically?

(Roger, I sent my message to the list just assuming that many 
subscribers would share the same interest, I appologize if this
was actually inappropriate).

Agus

Roger Bivand wrote:
> On Fri, 2 Jan 2009, Agustin Lobo wrote:
> 
>> Hi!
> 
>> It would be helpful if the material (source, datasets...) of the asdar 
>> book could be made available in few tar files (i.e., one for the 
>> datasets, another for the source code...). I've tried with downThemAll 
>> but get inconvenient names for the files.
> 
> Our test framework (run nightly on current R and packages) uses a script 
> including the following:
> 
> $ more run_tests.sh
> #! /bin/bash
> export ASDAR="http://www.asdar-book.org/"
> export ASDAR_BUNDLES="${ASDAR}bundles"
> 
> CHAPTERS="hello cm vis die cm2 csdacm sppa geos lat1 lat2 dismap"
> 
> for ch in $CHAPTERS; do
>   if test -d ${ch}
>     then cd ${ch}
>   else
>     mkdir ${ch}
>     cd ${ch}
>   fi
>   wget -N "${ASDAR_BUNDLES}/${ch}_bundle.zip"
>   unzip -o "${ch}_bundle.zip"
>   cd ..
> done
> 
> This generates a directory for each chapter, but you could do it 
> otherwise if you prefer. As you will have seen, the R scripts in each 
> chapter unpack the data set zip archives. We can look at trying to get 
> PHP to do this dynamically, but I guess a scripting solution is good 
> enough? I apologise for replying to the list, but since the question was 
> asked here, I felt obliged to do so. I'm sure questions about other 
> books would be handled here in the same way.
> 
> Best wishes,
> 
> Roger
> 
>>
>> Thanks!
>>
>> Agus
>>
> 

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster




More information about the R-sig-Geo mailing list