[R] putting stuff into bins...
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Sep 26 13:58:03 CEST 2006
Federico Calboli <f.calboli at imperial.ac.uk> writes:
> Hi All,
>
> I have a vector of data, a vector of bin breakpoints and I want to put my data
> in the bins and then extract fanciful informations like the mean value of each bin.
>
> I know I can write my own function, but I would have thought that R should have
> somewhere a function that took as arguments something like (data, breaks, what
> to do with the data in the bins). I surey could not find it trawling the R-help
> archives though.
>
> If such a function exists I'd be grateful to anyone pointing it out to me.
cut, split+lapply, aggregate, by
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list