[RkWard-devel] Short feedback on outlier test

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Mon Mar 12 23:43:11 UTC 2007


On Tuesday 13 March 2007 00:24, Stefan Roediger wrote:
> I started my code clean up today and stumbled over on I forgot. NAs to say
> it brief. Please have a look at chisq_out_test.php where I started with
> no.omit(...). I don't like my current approach because I have to write it
> everywhere (and I think this is stupid). But I also don't like to introduce
> a second variable to use one for length (eval (var))) and one for
> which(is.na(eval (var))). Suggestion?

I think using that additional variable may still be the best option available. 
One added benefit is that you could also avoid a lot of the eval()s this way. 
E.g.

	for (sub in objects) {
		...
		var <- na.omit (eval (sub))
	}

and then use var in most places, and sub (i.e. the still substituted variable 
name) only where you need the raw data. This would also make it easy to make 
removal of NAs optional. But maybe somebody else has a real neat idea on how 
to deal with this?

BTW, maybe use "object" instead of "var" as a name, since you also need the 
function var(), and this might look confusing?

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/20070313/6f2e0600/attachment.sig>


More information about the Rkward-devel mailing list