From tplate at acm.org  Thu Jul 12 00:20:28 2007
From: tplate at acm.org (Tony Plate)
Date: Wed, 11 Jul 2007 16:20:28 -0600
Subject: [Rd] sweep sanity checking?
In-Reply-To: <loom.20070709T175233-590@post.gmane.org>
References: <468579C0.7090809@zoo.ufl.edu>
	<loom.20070709T175233-590@post.gmane.org>
Message-ID: <469557AC.2010607@acm.org>

Just an opinion from an R user: I think it's a sound idea.  I use my own 
version of sweep with a stricter check: it stops if the vector is not 
exactly the right length.

-- Tony Plate

Ben Bolker wrote:
> Ben Bolker <bolker <at> zoo.ufl.edu> writes:
>
>   
>>   What would R-core think of the following 'enhanced'
>> sweep?  
>>     
>
>  (now posted at
> http://wiki.r-project.org/rwiki/doku.php?id=rdoc:base:sweep
> )
>
> It always warns if dim(x)[MARGIN] is
>   
>> not a multiple of length(STATS) {it's very hard indeed
>> for me to think of a situation where you'd actually
>> want this}; if check.margin=TRUE it is a bit stricter,
>> complaining whenever dim(x)[MARGIN] doesn't
>> match length(STATS).
>>
>>   This change seems fairly harmless since it never does anything
>> more than warn; the default for check.margin could
>> be FALSE if you wanted to allow people a bit more rope
>> to hang themselves with ...  (of course this won't prevent
>> you from sweeping the wrong margin of a square matrix,
>> but nothing will).
>>
>>   cheers
>>     Ben Bolker
>>
>>     
>
>   Enough time has now passed that I feel justified following up
> on this.  Does anyone have any opinions on it, one way or the other?
>
>   Ben
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] sweep sanity checking?
Tony Plate