create_plot(mtcars, "plot_violin", "mpg", "cyl") |> attributes()
+#> $names
+#> [1] "data" "layers" "scales" "guides" "mapping"
+#> [6] "theme" "coordinates" "facet" "plot_env" "layout"
+#> [11] "labels"
+#>
+#> $class
+#> [1] "gg" "ggplot"
+#>
#> $code
#> FreesearchR::plot_violin(pri = "mpg", sec = "cyl", ter = NULL)
#>
-mtcars |> plot_box(pri = "mpg", sec = "cyl", ter = "gear")
-#> Error in purrr::map(p, ~ggplot2::layer_scales(.x)[[axis]]$get_limits()): ℹ In index: 2.
-#> ℹ With name: 4.
-#> Caused by error in `viridis::scale_fill_viridis()`:
-#> ! Continuous values supplied to discrete scale.
-#> ℹ Example values: 4 and 6
+mtcars |> plot_box(pri = "mpg", sec = "gear")
+
+mtcars |> plot_box(pri = "mpg", sec="cyl")
+
mtcars |>
default_parsing() |>
plot_box(pri = "mpg", sec = "cyl", ter = "gear")
-
-mtcars |> plot_box_single("mpg")
-
-mtcars |> plot_box_single("mpg","cyl")
+mtcars |>
+ default_parsing() |>
+ plot_box(pri = "mpg", sec = "cyl", ter = "gear",axis.font.family="mono")
+
+mtcars |> plot_box_single("mpg")
+
+mtcars |> plot_box_single("mpg","cyl")
+
+gtsummary::trial |> plot_box_single("age","trt")
+#> Warning: Removed 11 rows containing non-finite outside the scale range
+#> (`stat_boxplot()`).
+#> Warning: Removed 11 rows containing missing values or values outside the scale range
+#> (`geom_point()`).
+
mtcars |> plot_hbars(pri = "carb", sec = "cyl")
#> Scale for fill is already present.
#> Adding another scale for fill, which will replace the existing scale.
-
+
mtcars |> plot_hbars(pri = "carb", sec = NULL)
#> Scale for fill is already present.
#> Adding another scale for fill, which will replace the existing scale.
-
+
mtcars |>
default_parsing() |>
plot_ridge(x = "mpg", y = "cyl")
#> Picking joint bandwidth of 1.38
-
+
mtcars |> plot_ridge(x = "mpg", y = "cyl", z = "gear")
#> Picking joint bandwidth of 1.52
#> Warning: The following aesthetics were dropped during statistical transformation: y and
@@ -256,21 +272,21 @@ Beatiful violin plot">ds <- data.frame(g = sample(LETTERS[1:2], 100, TRUE), first = REDCapCAST::as_factor(sample(letters[1:4], 100, TRUE)), last = REDCapCAST::as_factor(sample(letters[1:4], 100, TRUE)))
ds |> plot_sankey("first", "last")
#> Loading required package: ggplot2
-
+
ds |> plot_sankey("first", "last", color.group = "sec")
-
+
ds |> plot_sankey("first", "last", ter = "g", color.group = "sec")
#> Warning: Some strata appear at multiple axes.
#> Warning: Some strata appear at multiple axes.
#> Warning: Some strata appear at multiple axes.
-
+
mtcars |>
default_parsing() |>
plot_sankey("cyl", "gear", "am", color.group = "pri")
#> Warning: Some strata appear at multiple axes.
#> Warning: Some strata appear at multiple axes.
#> Warning: Some strata appear at multiple axes.
-
+
## In this case, the last plot as the secondary variable in wrong order
## Dont know why...
mtcars |>
@@ -279,9 +295,9 @@ Beatiful violin plot">#> Warning: Some strata appear at multiple axes.
#> Warning: Some strata appear at multiple axes.
#> Warning: Some strata appear at multiple axes.
-
+
mtcars |> plot_scatter(pri = "mpg", sec = "wt")
-
+
mtcars |> plot_violin(pri = "mpg", sec = "cyl", ter = "gear")
#> Warning: There was 1 warning in `summarize()`.
#> ℹ In argument: `V1 = .fun(as.data.frame(pick(everything())), var)`.
@@ -315,7 +331,7 @@ Beatiful violin plot">#> ℹ Set `drop = FALSE` to consider such groups for position adjustment purposes.
#> Warning: Groups with fewer than two datapoints have been dropped.
#> ℹ Set `drop = FALSE` to consider such groups for position adjustment purposes.
-
+