Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.

Non-standard evaluation in data.table() #6

Open
maurolepore opened this issue Jul 23, 2017 · 1 comment
Open

Non-standard evaluation in data.table() #6

maurolepore opened this issue Jul 23, 2017 · 1 comment

Comments

@maurolepore
Copy link
Contributor

maurolepore commented Jul 23, 2017

#Hi @ervanSTRI and all users of data.table,

If you write functions with the package data.table, you may need to learn a bit about non-standard evaluation; or you may get unexpected or silent errors. To learn generally about non-standard evaluation, I recommend this: http://adv-r.had.co.nz/Computing-on-the-language.html

data.table, at least the by argument, seems to use non-standard evaluation. Non-standard evaluation is great when you work interactively; but it can bite you if you use it inside the functions you write. In the base case scenario, the problem will be that you get an unexpected error. In the worse case scenario, the error will be silent: you will get output but it is wrong.

I am not yet familiar with data.table, and the best I can do right now is to point you to examples of
non-standard evaluation in the package dplyr.

dplyr also uses non-standard evaluation; and provides an approach to writing functions with dplyr that is called tidy eval: http://dplyr.tidyverse.org/articles/programming.html.

@djj4tree
Copy link

I use data.table frequently as it is optimized for large data sets. What was the original issue here? And what is meant my non-standard evaluation?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants