Skip to content

[R-Forge #975] Multiple expressions in quote expression passed to by #321

@arunsrinivasan

Description

@arunsrinivasan

Submitted by: Matt Dowle; Assigned to: Nobody; R-Forge link

DT <- data.table( a=1:5, b=11:50, d=c("A","B","C","D") )
f <- quote( list(d) ) # ok
DT[ , mean(b), by=eval(f) ] # Now this works; thanks
foo <- function( grp ) {
DT[ , mean(b), by=eval( grp ) ]
}
foo( quote( list(d) ) ) # ok

but ...

foo( quote( list(d,a) ) )
Error in bysubl[[jj + 1]] : subscript out of bounds

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions