Show a boxplot using characters in the terminal window
term_boxplot(formula, data = NULL, width = getOption("width"))
a formula
data frame or matrix
width of the boxplot in characters
invisibly return the color summary data frame used to draw the boxplot
term_boxplot(mpg ~ cyl, data=mtcars)
#> # Color data frame (class colorDF) 5 x 4:
#> │Col │Class│NAs │unique│Summary
#> │<chr>│<chr>│<int>│<int> │<chr>
#> 1│4 │<dbl>│ 0│ 9│ ╾──┤ + ├──────╼
#> 2│6 │<dbl>│ 0│ 6│ ╾─┤ + ├
#> 3│8 │<dbl>│ 0│ 12│╾───────┤ + ├─────╼
#> 4│Range│<chr>│ 0│ 1│Only one value: Range: 10.4 - 33.9
term_boxplot(Sepal.Length ~ Species, data=iris, width=70)
#> # Color data frame (class colorDF) 5 x 4:
#> │Col │Class│NAs │unique│Summary
#> │<chr> │<chr>│<int>│<int> │<chr>
#> 1│setosa │<dbl>│ 0│ 15│╾────┤+ ├─────╼
#> 2│versicolor│<dbl>│ 0│ 21│ ╾─────┤ + ├──────╼
#> 3│virginica │<dbl>│ 0│ 21│ ╾───────────┤ + ├────────╼
#> 4│Range │<chr>│ 0│ 1│Only one value: Range: 4.3 - 7.9