[The new version of gregmisc will be showing up on CRAN shortly.]
> -----Original Message-----
> From: Warnes, Gregory R
> Sent: Friday, March 26, 2004 6:07 PM
> To: 'Sean Davis'
> Subject: RE: Quick "running" question
>
> Hi Sean,
>
> Congratulations, you found a bug!
>
> My "running" function took an improper shortcut. When
> allow.fewer=FALSE it was still passing shorter lists of
> elements to the called function, and then overwriting the
> results for the shorter lists with NAs. I've now corrected
> the code to skip evaluation of the function on lists shorter
> than the specified length when allow.fewer=FALSE.
>
> I'm attaching the latest version of the gregmisc package with
> the corrected code. I've also added a couple of other
> features while I was mucking about...
>
>
>
> -Greg
>
> > -----Original Message-----
> > From: Sean Davis [mailto:sdavis2 at mail.nih.gov]
> > Sent: Thursday, March 25, 2004 5:25 PM
> > To: Warnes, Gregory R
> > Subject: Quick "running" question
> >
> >
> > Greg,
> >
> > I am starting to use running and do the following:
> >
> > > running(1:10,function(h) {t.test(h)},width=5)
> > Error in t.test.default(h) : not enough x observations
> > > running(1:10,function(h) {t.test(h)},width=5,allow.fewer=T)
> > Error in t.test.default(h) : not enough x observations
> >
> > It works fine for mean, median, etc. What am I missing?
> >
> > Thanks,
> > Sean
> >
>
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}