Re: [Rd] How x[, 'colname1'] is implemented?

2010-01-02 Thread Barry Rowlingson
On Fri, Jan 1, 2010 at 9:40 PM, Peng Yu pengyu...@gmail.com wrote: I'm not complaining that it is not documented. Yes but you didn't answer my question. When you ask a question on these (or any mailing lists) you should always say what efforts you've made to answer the question. I first looked

Re: [Rd] How x[, 'colname1'] is implemented?

2010-01-01 Thread Barry Rowlingson
On Thu, Dec 31, 2009 at 11:27 PM, Peng Yu pengyu...@gmail.com wrote: I don't see where describes the implementation of '[]'. For example, if x is a matrix or a data.frame, how the lookup of 'colname1' is x[, 'colname1'] executed. Does R perform a lookup in the a hash of the colnames? Is the

Re: [Rd] How x[, 'colname1'] is implemented?

2010-01-01 Thread Peng Yu
On Fri, Jan 1, 2010 at 6:52 AM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Thu, Dec 31, 2009 at 11:27 PM, Peng Yu pengyu...@gmail.com wrote: I don't see where describes the implementation of '[]'. For example, if x is a matrix or a data.frame, how the lookup of 'colname1' is x[,

Re: [Rd] How x[, 'colname1'] is implemented?

2010-01-01 Thread Seth Falcon
On 1/1/10 1:40 PM, Peng Yu wrote: On Fri, Jan 1, 2010 at 6:52 AM, Barry Rowlingson b.rowling...@lancaster.ac.uk wrote: On Thu, Dec 31, 2009 at 11:27 PM, Peng Yu pengyu...@gmail.com wrote: I don't see where describes the implementation of '[]'. For example, if x is a matrix or a data.frame,

[Rd] How x[, 'colname1'] is implemented?

2009-12-31 Thread Peng Yu
I don't see where describes the implementation of '[]'. For example, if x is a matrix or a data.frame, how the lookup of 'colname1' is x[, 'colname1'] executed. Does R perform a lookup in the a hash of the colnames? Is the reference O(1) or O(n), where n is the second dim of x?