[Rd] subset data.frame at C level
j@me@@|@he@ter @end|ng |rom gm@||@com
Tue Jun 23 22:11:42 CEST 2020
It looks to me like internally .subset2 uses `get1index()`, but this
function is declared in Defn.h, which AFAIK is not part of the exported R
Looking at the code for `get1index()` it looks like it just loops over the
(translated) names, so I guess I just do that .
On Wed, Jun 17, 2020 at 6:11 AM Morgan Morgan <morgan.emailbox using gmail.com>
> Hope you are well.
> I was wondering if there is a function at C level that is equivalent to
> mtcars$carb or .subset2(mtcars, "carb").
> If I have the index of the column then the answer would be VECTOR_ELT(df,
> asInteger(idx)) but I was wondering if there is a way to do it directly
> from the name of the column without having to loop over columns names to
> find the index?
> Thank you
> Best regards
> [[alternative HTML version deleted]]
> R-devel using r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-devel