[R-sig-Geo] Material for asdar book

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Jan 2 20:22:55 CET 2009


2009/1/2 Roger Bivand <Roger.Bivand at nhh.no>:

> $ 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?

 Why not an R solution using download.file?

Barry




More information about the R-sig-Geo mailing list