[R-sig-Geo] Material for asdar book
Roger Bivand
Roger.Bivand at nhh.no
Fri Jan 2 20:05:37 CET 2009
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
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list