From Friedrich.Leisch@ci.tuwien.ac.at  Wed Apr 16 17:17:25 1997
From: Friedrich.Leisch@ci.tuwien.ac.at (Friedrich Leisch)
Date: Wed, 16 Apr 1997 18:17:25 +0200
Subject: R-alpha: data in contributed packages
Message-ID: <199704161617.SAA14180@galadriel.ci.tuwien.ac.at>


I know, we've discussed this several times in the good old days days
of the R-testers list :-), but the problem is still unsolved.

I want to include Tibshirani's data in my port of the bootstrap
package, but we still have no way of including data in a clean way.

IMHO we should have a subdirectory of $RHOME/data for each library,
e.g.
	$RHOME/data/base
	$RHOME/data/bootstrap

Actually that's the setup we are currently using here in Vienna.

We've modified the filename script to reflect that changes (which also
allows users to have a R hierarchy with library, data, etc in
~/lib/R):


*********** original filename *********** =20

#!/bin/sh

file=3D$RHOME/$1/$2

if [ -r $file ]
then
        echo $file
else
        echo
fi



*********** our filename *********** =20

#!/bin/sh

for file in $HOME/lib/R/$1/$2 \         # user R hierarchy
            $RHOME/$1/$2 \              # standard dirs
            $RHOME/$1/[^.]*/$2;         # one level of subdirs
do
    if [ -r $file ]
    then
        echo $file
        break
    fi
done

if [ ! -r $file ]
then
    echo
fi


****************************

Any comments, ... ?

Best,
Fritz

PS: In a best of all possible worlds one should of course have some
recursive searching like in TeX :-)

--=20
---------------------------------------------------------------------
                         Friedrich  Leisch                            =20
 Institut f=FCr Statistik                      Tel: (+43 1) 58801 4541
 Technische Universit=E4t Wien                 Fax: (+43 1)  504 14 98
 Wiedner Hauptstra=DFe 8-10/1071      Friedrich.Leisch@ci.tuwien.ac.at
 A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch
      PGP public key http://www.ci.tuwien.ac.at/~leisch/pgp.key
---------------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


R-alpha: data in contributed packages
Friedrich Leisch