Closed robjhyndman closed 4 years ago
Is there any value to having NA values in dist_sample()
? Perhaps the warning should occur on object creation.
Yes, that would be an alternative (or warn in both functions). There is no value in having NAs, but sometimes they might be generated. For example, if the distribution is a set of percentiles, then it is possible that some NAs will be generated due to the percentiles not covering the full range (0,100).
Fixed, thanks.
Created on 2020-04-10 by the reprex package (v0.3.0)
I think it would be reasonable to generate a warning here rather than an error, and pass
na.rm=TRUE
toquantile()
.