DT = data.table(a = NA)
DT[!is.na(a), plot(density(a))]
This returns
Error in density.default(a) : argument 'x' must be numeric
I'm surprised we got to j. Is there any reason we'd want to evaluate j here?
I guess this is to cover grouping situations where we want to make sure each group returns the same shape, even if it has 0 rows?
If so, is there not something we can do to be smarter about how to handle this?
(in this situation, I'm not even sure what my expected output is, TBH)
This returns
I'm surprised we got to
j. Is there any reason we'd want to evaluatejhere?I guess this is to cover grouping situations where we want to make sure each group returns the same shape, even if it has 0 rows?
If so, is there not something we can do to be smarter about how to handle this?
(in this situation, I'm not even sure what my expected output is, TBH)