[R] plot means ?
David Winsemius
dwinsemius at comcast.net
Mon Jul 11 21:50:04 CEST 2011
On Jul 11, 2011, at 3:36 PM, Sam Steingold wrote:
>> * David Winsemius <qjvafrzvhf at pbzpnfg.arg> [2011-07-11 15:32:26
>> -0400]:
>>
>> On Jul 11, 2011, at 3:18 PM, Sam Steingold wrote:
>>
>>> I need this plot:
>>> given: x,y - numerical vectors of length N
>>> plot xi vs mean(yj such that |xj - xi|<epsilon)
>>> (running mean?)
>>> alternatively, discretize X as if for histogram plotting and plot
>>> mean
>>> y
>>> over the center of the histogram group.
>>
>> It sounds as though you asking for smoothing splines with an
>> adjustable
>> band width ... something that is very easy in R.
>
> Unlikely. I do not need smoothing. I have far too many points far
> too
> densely for splines to make much sense.
That in turn does not make sense (to me anyway.) Just narrow the
bandwidth.
> I just need the mean (with confidence bounds, if possible) over many
> small intervals.
Also sounds easy to implement. Post an example. At the moment it is
not clear if your intervals are disjoint or overlapping.
?findInterval # may be useful or
?cut
?seq
?tapply
>
> thanks.
>
> --
> Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final)
> X 11.0.60900031
> http://www.PetitionOnline.com/tap12009/ http://honestreporting.com
> http://camera.org http://thereligionofpeace.com http://pmw.org.il
> Two psychics reading each other's minds will die from stack overflow.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list