Running examples in ‘ggpubr-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ggsummarytable
> ### Title: GGPLOT with Summary Stats Table Under the Plot
> ### Aliases: ggsummarytable ggsummarystats print.ggsummarystats
> ###   print.ggsummarystats_list
> 
> ### ** Examples
> 
> # Data preparation
> #::::::::::::::::::::::::::::::::::::::::::::::::
> data("ToothGrowth")
> df <- ToothGrowth
> df$dose <- as.factor(df$dose)
> # Add random QC column
> set.seed(123)
> qc <- rep(c("pass", "fail"), 30)
> df$qc <- as.factor(sample(qc, 60))
> # Inspect the data
> head(df)
   len supp dose   qc
1  4.2   VC  0.5 pass
2 11.5   VC  0.5 pass
3  7.3   VC  0.5 pass
4  5.8   VC  0.5 fail
5  6.4   VC  0.5 pass
6 10.0   VC  0.5 fail
> 
> 
> # Basic summary stats
> #::::::::::::::::::::::::::::::::::::::::::::::::
> # Compute summary statistics
> summary.stats <- df %>%
+   group_by(dose) %>%
+   get_summary_stats(type = "common")
> summary.stats
# A tibble: 3 × 11
  dose  variable     n   min   max median   iqr  mean    sd    se    ci
  <fct> <chr>    <dbl> <dbl> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 0.5   len         20   4.2  21.5   9.85  5.03  10.6  4.5  1.01   2.11
2 1     len         20  13.6  27.3  19.2   7.12  19.7  4.42 0.987  2.07
3 2     len         20  18.5  33.9  26.0   4.3   26.1  3.77 0.844  1.77
> 
> # Visualize summary table
> ggsummarytable(
+   summary.stats, x = "dose", y = c("n", "median", "iqr"),
+   ggtheme = theme_bw()
+ )
> 
> 
> # Create plots with summary table under the plot
> #::::::::::::::::::::::::::::::::::::::::::::::::
> # Basic plot
> ggsummarystats(
+   df, x = "dose", y = "len",
+   ggfunc = ggboxplot, add = "jitter"
+ )
> 
> # Color by groups
> ggsummarystats(
+   df, x = "dose", y = "len",
+   ggfunc = ggboxplot, add = "jitter",
+   color = "dose", palette = "npg"
+ )
> 
> # Create a barplot
> ggsummarystats(
+   df, x = "dose", y = "len",
+   ggfunc = ggbarplot, add = c("jitter", "median_iqr"),
+   color = "dose", palette = "npg"
+ )
> 
> # Facet
> #::::::::::::::::::::::::::::::::::::::::::::::::
> # Specify free.panels = TRUE for free panels
> ggsummarystats(
+   df, x = "dose", y = "len",
+   ggfunc = ggboxplot, add = "jitter",
+   color = "dose", palette = "npg",
+   facet.by = c("supp", "qc"),
+   labeller = "label_both"
+ )
Error in nchar(xs) : 
  number of characters is not computable in "bytes" encoding, element 1
Calls: ggsummarystats ... withCallingHandlers -> <Anonymous> -> .Call -> <Anonymous>
Error in nchar(xs) : 
  number of characters is not computable in "bytes" encoding, element 1
Calls: ggsummarystats ... withCallingHandlers -> <Anonymous> -> .Call -> <Anonymous>
Execution halted