vertesy / ggExpress

ggExpress is the fastest way to create, annotate and and save plots in R.
https://vertesy.github.io/ggExpress
GNU General Public License v3.0
4 stars 2 forks source link

qbarplot.df fails on example #37

Closed vertesy closed 7 months ago

vertesy commented 7 months ago

Description

file.edit("~/GitHub/Packages/ggExpress/R/ggExpress.R")

my_tibble <- tibble(
  Column_1 = c("A", "A", "A", "B", "C", "C"),
  Column_2 = c("X", "Y", "Y", "Z", "X", "Z")
)
freq_table <- my_tibble %>% count(Column_1, Column_2)
qbarplot.df(freq_table)
qbarplot.df(my_tibble)

example_tibble <- tibble(
  ID = rep(c("A", "B", "C"), times = 4),
  Time = rep(1:4, each = 3),
  Value = rnorm(12)
)

qbarplot.df(example_tibble)

> qbarplot.df(example_tibble)
Error in median(as.numeric(df[, y])) : 
  'list' object cannot be coerced to type 'double'