Private data libraries (idea & trick)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
24 Sep 1999 16:29:44 +0200


Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:

> >>>>> Peter Dalgaard BSA writes:
...
> >> data(file)
> >> file
> >   a b
> > 1 1 b
> > 2 3 d
> 
> > Question: Should we perhaps clean this up a little and formalize it?
> 
> Actually, this works in directories different from the current one as
> well, as the working directory is changed temporarily. 

Yes. Actually it relies on it because file.{R,txt} would be in ./data

> However, someone
> pointed out that this is not thread-safe, so we should be careful about
> announcing this feature.

Er, didn't that just mean that the CWD would have to be yet another
per-thread item, or source() would have to block other threads for the
duration? Would seem a bit silly to have a chdir option and not be
allowed to use it...

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._