-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need an easier way to use dynamically determined symbols #2589
Labels
Comments
eval(as.name(s1)) is more efficient. But still, it would be great to generalize the .. notation so that it could replace the eval(as.name()) workaround. |
I think the |
AFAIK using language objects is most efficient way, and kind of base R way of handling the task. Two examples: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose I have a
data.table
created as follows:I need to do calculations with dynamically determined symbols within
j
likeTwo approaches can do the work:
But if the data is very big and
by=
is used, the performance can significantly decay. Also the first approach usingget()
has scoping problem ifs1
ors2
are themselves columns ofdt
.Is there any possibility that makes it easier to use dynamically determined symbol without such significant performance decay and scoping problem?
For example, something like
which is inspired by the
..x
notation introduced lately.The text was updated successfully, but these errors were encountered: