[R] tapply on a matrix?

Thomas Lumley tlumley at u.washington.edu
Sat Apr 21 00:40:52 CEST 2001

On Fri, 20 Apr 2001, Jon McAuliffe wrote:

> suppose i have an nx2 matrix A; call its column vectors
> x and y. the rows of A are grouped by a factor F. i want to fit
> one lowess curve (y vs. x) for each subset of rows corresponding
> to a particular level of F. naively, i mean something like
> tapply(A, F, fun = lowess)  ,
> but tapply needs A to be 1-dimensional. reading the help pages,
> the other {,l,s}apply functions seem not to be germane in this
> situation either. what's the correct approach here?



Thomas Lumley			Asst. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list