3 ms·
R has many cases of inconsistency. Like substitute "its value is substituted, unless env is .GlobalEnv in which case the symbol is left unchanged." dim and di
by fithisux 5y ago
R has many cases of inconsistency. Like substitute
"its value is substituted, unless env is .GlobalEnv in which case the symbol is left unchanged."
dim and dims :-)
R could do more here. I really like R.
- nomilk 5y agoInteresting. I must admit I've never used substitute. I tried dims but: Error in dims(iris) : could not find function "dims" I do find the occasional oddity. I've noticed more very useful messages/warnings (particularly in common tidyverse functions) recently, so I think they help. To be fair, these quirks are generally very uncommon in day to day use.
- nojito 5y agoYou may want to check out substitute2 which is much easier to use. https://rdatatable.gitlab.io/data.table/reference/substitute2.html https://rdatatable.gitlab.io/data.table/reference/substitute...