Feature Request. Related to #857. We have 2 dts: ``` r library(data.table) dict <- data.table(symbol = c("a","b","c"), ratio = c(5,10,15), key = "symbol") dt <- data.table(symbol = c("a","b","c","d"), value = rnorm(4)) ``` Which we want join: ``` r dict[dt][,list(symbol, new_value = ratio * value)] ``` Consider the case when we expect to have match on all data in the join. In case of nomatch we want to raise error. Currently it is possible using: ``` r new_dt <- dict[dt] if(any(is.na(new_dt$ratio))) stop("missing data in the reference dictionary") ``` Which makes us unable to make chaining in such case. If we could use something like this: ``` r dict[dt,nomatch=quote(stop("missing data in the reference dictionary")) ][,list(symbol, new_value = ratio * value)] ``` just to stop process and raise the error in case of any nomatch.
Activity
[-]data.table join nomatch=quote(stop())[/-][+][Request] data.table join nomatch=quote(stop())[/+]arunsrinivasan commentedon Nov 21, 2014
Or
nomatch = "error"like #655. I'd say this should be added to #857, and closed, as this is very related to #857.jangorecki commentedon Dec 13, 2014
merged with #857.