Novartis / xgxr

R package for supporting exploratory graphics at http://opensource.nibr.com/xgx
Other
13 stars 7 forks source link

xgx_stat_ci - bins option causes error if say half the patients are at the same level. #54

Closed iamstein closed 1 year ago

iamstein commented 1 year ago
d = data.frame(x = c(1:10, rep(10, 10)),
               y = 1:20)
ggplot(d, aes(x=x, y=y)) + geom_point() + xgx_stat_ci(bins = 4)
ggplot(d, aes(x=x, y=y)) + geom_point() + xgx_stat_ci(breaks = c(0, 3, 6, 9.5, 10.5))
iamstein commented 1 year ago

we now throw an error if 4 bins cannot be uniquely specified using the quantile function (due to many repeats in the dataset)