[rkward-devel] factor <-> character (was: three enhancemens)

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Tue Feb 8 16:18:56 UTC 2011


Hi,

On Tuesday 08 February 2011, meik michalke wrote:
> maybe it would be better to keep labels strictly to factors only,

yes, I'm starting to think so, too. I'll still wait for more input.

One corner-case is changing data from factor to character and back. Currently 
levels are preserved, and I think that really is useful. So labels would still 
be kept around, but probably labelled view (see below) would only be available 
for factors.

> but to
> also have a switch to toggle between labeled view and integer view (like
> with unclass())?

Yes, that would be useful in it's own right. Would you add this to the feature 
request tracker?

> > > in fact, this doesn't work in RKWard either:
> > > > some.data <- data.frame(a=c("a","b","c","d"), stringsAsFactors=FALSE)
> > 
> > [...]
> > 
> > > > some.data$a
> > > 
> > > [1] "1" "2" "3" "4"
> > 
> > I could not reproduce this, and we really don't mess with data.frame() on
> > this level. Are you sure?
> 
> to my surprise i couldn't reproduce this myself at first. then i tried to
> reconstruct the steps i did yesterday. it seems even weirder now. the
> effect above occurs after rewriting a data.frame which is opened in the
> editor window

It was a combination of the conversion bug, with a second bug (which resulted 
in the wrongly converted values to be written back to R).

I wonder how many bugs can _possibly_ be left in the data editor, now?

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/20110208/b4e93929/attachment.sig>


More information about the Rkward-devel mailing list