[RkWard-devel] length() and na.rm

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Thu Aug 17 08:47:43 UTC 2006


On Thursday 17 August 2006 11:19, Stefan Rödiger wrote:
> I checked it and there is still a problem with the length. Though the nas
> are given correct the length is wrong. The counted number is 1000 instead
> of 100 for 900 na.

Sorry, my fault. I changed the logic, somewhat different to what I described 
in the mail. In the version I sent, it reads

blabla$length <- length (eval (var)))

to calculate the *total* length instead of

blabla$length <- length (which (!is.na (eval (var)))))

which should in fact yield 100.

This points to the underlying problem, that maybe different users expect a 
different answer when they check "length". Probably the safest way out of 
this is this:

- Remove the "NA count" option again.
- Instead, when user checks "length", three numbers will be produced 
automatically:
1) total length
2) valid cases
3) missing cases (= 1) - 2))

I'm not sure how other systems do this, but this way, we'd be sure to avoid 
confusion. What do you think?

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20060817/2a39cdea/attachment.sig>


More information about the Rkward-devel mailing list