New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gt_plot_bar_pct()
plots NA
values
#86
Comments
Thanks! Latest version will fix this, will push shortly. library(gt)
library(gtExtras)
data <- data.frame(
id = 1:3,
a = 1:3,
b = c(1, NA, 3),
c = rep(NA, 3)
)
data |>
gt() |>
gt_plt_bar(a) |>
gt_plt_bar(b) |>
gt_plt_bar(c) |>
gt_reprex_image() data |>
gt() |>
cols_label(a = "aaaaa", b = "bbbbb", c = "ccccc") |>
gt_plt_bar_pct(a) |>
gt_plt_bar_pct(b) |>
gt_plt_bar_pct(c) |>
gt_reprex_image() Created on 2023-04-11 by the reprex package (v2.0.1) |
I am having an issue with this example. I actually get the full bar for NAs using I have the current version of Is there another dependency I am missing?
My
Thank you for your time and help. |
Behaviors of
gt_plt_bar()
andgt_plot_bar_pct()
differ whenNA
values are present. The former skips over these (correctly, it seems) but the latter does not skip these and rather scales to the highest value.Created on 2023-03-22 with reprex v2.0.2
Session info
The text was updated successfully, but these errors were encountered: