hi,

Am Dienstag, 8. Februar 2011, um 10:42:52 schrieb Thomas Friedrichsmeier:
> I'll split the issues, and reply to the last one, first.

yes, that's better, sorry for the compressed content, it grew while writing...

> > i was first surprised that the editor still shows factor levels
> 
> Yes, the idea was to support "value labels" on data types other than
> factors, similar to e.g. SPSS. Think of likert-scales for a use case where
> data is "numeric" (not in IRT, of course), but end-points are named. Of
> course, since factor levels can only be assigned to consecutive integers,
> this does not work too well. Perhaps a feature worth removing? What do you
> think?

seemingly mixing features of factors and character vectors might bear the risk 
of RKWard behaving ("feeling") considerably different than R does. on the 
other hand i do see the feature.

maybe it would be better to keep labels strictly to factors only, but to also 
have a switch to toggle between labeled view and integer view (like with 
unclass())?

> > 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 
at the same time:

> other.data <- data.frame(a=c("a","b","c","d"))
(open object in editor)
> other.data
  a
1 a
2 b
3 c
4 d

> other.data <- data.frame(a=c("a","b","c","d"), stringsAsFactors=FALSE)
> other.data
  a
1 1
2 2
3 3
4 4

> other.data <- data.frame(a=c("a","b","c","d"))
> other.data
     a
1 <NA>
2 <NA>
3 <NA>
4 <NA>

> other.data$a
[1] <NA> <NA> <NA> <NA>
attr(,".rk.invalid.fields")
attr(,".rk.invalid.fields")$`1`
[1] 1

attr(,".rk.invalid.fields")$`2`
[1] 2

attr(,".rk.invalid.fields")$`3`
[1] 3

attr(,".rk.invalid.fields")$`4`
[1] 4

Levels: a b c d

meanwhile, the same object is shown in the editor as a valid factor. all of 
this does not occur if the object is not opened in the editor. maybe something 
with the object binding or a race condition? or is this still caused by the 
problem you solved already? i'll try again with the next daily build.


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  abt. f"ur diagnostik und differentielle psychologie
  institut f"ur experimentelle psychologie
  heinrich-heine-universit"at d"usseldorf

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel

Reply via email to