[R] tapply on a matrix?

Jon McAuliffe jon at mcauliffe.com
Sat Apr 21 00:21:53 CEST 2001

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?

many thanks

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