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

Peng Yu pengyu.ut at gmail.com
Thu Dec 31 23:15:42 CET 2009


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?




More information about the R-help mailing list