On Mon, 27 Sep 2004, Liaw, Andy wrote:
> The problem is that temp2 is a data frame, and the function you are
> sapply()ing to returns a row from a data frame. A data frame is really a
> list, with each variable corresponding to a component. If you extract a row
> of a data frame, you get another
Elizabeth Purdom stanford.edu> writes:
:
: Hi,
:
: I use sapply very frequently, but I have recently noticed a behavior of
: sapply which I don't understand and have never seen before. Basically,
: sapply returns what looks like a matrix, says it a matrix, and appears to
: let me do matrix
Elizabeth Purdom wrote:
I use sapply very frequently, but I have recently noticed a behavior of
sapply which I don't understand and have never seen before. Basically,
sapply returns what looks like a matrix, says it a matrix, and appears
to let me do matrix things (like transpose). But it is al
The problem is that temp2 is a data frame, and the function you are
sapply()ing to returns a row from a data frame. A data frame is really a
list, with each variable corresponding to a component. If you extract a row
of a data frame, you get another data frame, not a vector, even if all
variables
Hi,
I use sapply very frequently, but I have recently noticed a behavior of
sapply which I don't understand and have never seen before. Basically,
sapply returns what looks like a matrix, says it a matrix, and appears to
let me do matrix things (like transpose). But it is also a list and behave