[rkward-devel] object recovery
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Sun Mar 25 16:06:14 UTC 2012
Hi,
On Thursday 22 March 2012, meik michalke wrote:
> if you remove columns from a data.frame (e.g., by overwriting it with an
> empty data.frame) which is opened in RKWard's data editor at the same
> time, you are asked if you would like to recover that data. try this:
[...]
> i don't know how RKWard handles this, but i think it would be best if you
> were not asked one variable at a time, but once for the whole object,
> presenting some kind of list of variables which were removed and could be
> checked to have them recovered. but at least a "don't bother me gain"
> checkbox or a "say 'yes' to all changes to this object" button would be
> nice ;-)
true, I've run into this, before, myself, but shrugged it off, at the time.
Thinking about it, however, I don't think I ever actually had a reason to
recover an object. Also, in fact, in the case of rewriting a whole data.frame
from scratch, the recover functionality will sometimes fail, rather miserably.
Try this:
> a <- data.frame (a=1:4, b=1:4)
> a
a b
1 1 1
2 2 2
3 3 3
4 4 4
> rk.edit (a)
NULL
> a <- data.frame (a=1:3, c=1:3)
> # Select "Yes" when asked to restore a$b
> a
a c
1 1 1
2 2 2
3 3 3
>
See the command log for why this fails.
Perhaps both the easiest and best solution would be to offer recovery for top-
level objects, only, i.e. offer to recover "a", if "a" is found to be removed
or is no longer a data.frame, but don't offer to recover a[["b"]] as above.
Probably accidental removal / overwriting of "a" is much more likely than
accidental removal of a$b, in the first place.
What do you think?
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20120325/6b20981f/attachment.sig>
More information about the Rkward-devel
mailing list