Skip to content

Reading and writing to S-like databases

2 messages · Liaw, Andy, Brian Ripley

#
[snipped...]
I'd like to express my strong second for similar feature.  I think it would
be very helpful for project management.  Also would be nice is something
similar to the Unix "ls -l": giving modes, length (or dim), etc. of the
objects in some file or the workspace.
Regards,
Andy

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 28 Sep 2001, Liaw, Andy wrote:

            
It's not as simple as that in R.  Objects are not self-contained: they
have an environment.  And objects can share parts.  The model you both
seem to have in mind isn't appropriate for R workspaces.

It's very easy to write a function giving modes, length (or dim), etc for
a workspace, which I'll leave as an exercise for the reader.  But it will
not be like ls -l: the size of an R object is not well-defined (see
?object.size) and neither is the data (because of sharing).

Take a look at the saveload.c source code, and when you follow what it
does you will be able to work out what is feasible.