Skip to content

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

Closed

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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