Re: [R] subsetting matrix replacement oddities

2003-09-18 Thread Martin Maechler
Spencer == Spencer Graves [EMAIL PROTECTED] on Wed, 17 Sep 2003 17:41:09 -0700 writes: Spencer A subset of a data.frame is still a data.frame. A Spencer data.frame is actually a list with additional Spencer attributes. As far as I know, your solution, Spencer as.matrix, is

[R] subsetting matrix replacement oddities

2003-09-17 Thread Ross Boylan
When assigning a dataframe to a subset of a matrix I got a very odd result. Am I missing something, or is this a bug? Details are below. Also, if m is defined outside of the current function, is m[...] - foo necessary to update it, or does regular replacement m[] - foo work (that is, does

Re: [R] subsetting matrix replacement oddities

2003-09-17 Thread Spencer Graves
A subset of a data.frame is still a data.frame. A data.frame is actually a list with additional attributes. As far as I know, your solution, as.matrix, is an appropriate tool to convert a data.frame to a matrix. Caution may be appropropriate, however, because if the data.frame includes