diff --git a/pkgdown.yml b/pkgdown.yml index a7ec4c2..36c9f3b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2025-03-11T13:01Z +last_built: 2025-03-12T17:44Z urls: reference: https://agdamsbo.github.io/freesearcheR/reference article: https://agdamsbo.github.io/freesearcheR/articles diff --git a/reference/columnSelectInput.html b/reference/columnSelectInput.html index 66a5427..2ef93b1 100644 --- a/reference/columnSelectInput.html +++ b/reference/columnSelectInput.html @@ -53,7 +53,8 @@ Adds the option to select "none" which is handled later

col_subset = NULL, placeholder = "", onInitialize, - none_label = "No variable selected" + none_label = "No variable selected", + maxItems = NULL ) @@ -96,6 +97,10 @@ Adds the option to select "none" which is handled later

none_label

label for "none" item

+ +
maxItems
+

max number of items

+

Value

diff --git a/reference/data-plots-6.png b/reference/data-plots-6.png index c228680..d8a1a36 100644 Binary files a/reference/data-plots-6.png and b/reference/data-plots-6.png differ diff --git a/reference/data-plots-7.png b/reference/data-plots-7.png index 0b9b69c..98e6907 100644 Binary files a/reference/data-plots-7.png and b/reference/data-plots-7.png differ diff --git a/reference/data-plots-8.png b/reference/data-plots-8.png index e5cabc6..6e51c2c 100644 Binary files a/reference/data-plots-8.png and b/reference/data-plots-8.png differ diff --git a/reference/data-plots.html b/reference/data-plots.html index 1e2054e..68e42de 100644 --- a/reference/data-plots.html +++ b/reference/data-plots.html @@ -1,11 +1,11 @@ -Title — data-plots • freesearcheRPlot nice ridge plot — data-plots • freesearcheR
-

Title

+

Plot nice ridge plot

Wrapper to create plot based on provided type

Nice horizontal stacked bars (Grotta bars)

Beatiful violin plot

@@ -69,7 +69,7 @@ Beautiful sankey plot with option to split by a tertiary group"> plot_scatter(data, x, y, z = NULL) -sankey_ready(data, x, y, z = NULL, numbers = "count") +sankey_ready(data, x, y, numbers = "count", ...) plot_sankey(data, x, y, z = NULL, color.group = "x", colors = NULL)
@@ -173,50 +173,67 @@ Beautiful sankey plot with option to split by a tertiary group"> ds <- data.frame(g = sample(LETTERS[1:2], 100, TRUE), first = REDCapCAST::as_factor(sample(letters[1:4], 100, TRUE)), last = sample(c(letters[1:4], NA), 100, TRUE, prob = c(rep(.23, 4), .08))) ds |> sankey_ready("first", "last") #> # A tibble: 19 × 7 -#> first last n gx.sum gy.sum lx ly -#> <fct> <chr> <int> <int> <int> <fct> <fct> -#> 1 c a 7 28 32 "c\n(n=28)" "a\n(n=32)" -#> 2 c b 6 28 26 "c\n(n=28)" "b\n(n=26)" -#> 3 c c 5 28 15 "c\n(n=28)" "c\n(n=15)" -#> 4 c d 6 28 17 "c\n(n=28)" "d\n(n=17)" -#> 5 c NA 4 28 10 "c\n(n=28)" "NA\n(n=10)" -#> 6 a a 9 24 32 "a\n(n=24)" "a\n(n=32)" -#> 7 a b 6 24 26 "a\n(n=24)" "b\n(n=26)" -#> 8 a c 6 24 15 "a\n(n=24)" "c\n(n=15)" -#> 9 a d 1 24 17 "a\n(n=24)" "d\n(n=17)" -#> 10 a NA 2 24 10 "a\n(n=24)" "NA\n(n=10)" -#> 11 b a 8 20 32 "b\n(n=20)" "a\n(n=32)" -#> 12 b b 5 20 26 "b\n(n=20)" "b\n(n=26)" -#> 13 b c 4 20 15 "b\n(n=20)" "c\n(n=15)" -#> 14 b d 2 20 17 "b\n(n=20)" "d\n(n=17)" -#> 15 b NA 1 20 10 "b\n(n=20)" "NA\n(n=10)" -#> 16 d a 8 28 32 "d\n(n=28)" "a\n(n=32)" -#> 17 d b 9 28 26 "d\n(n=28)" "b\n(n=26)" -#> 18 d d 8 28 17 "d\n(n=28)" "d\n(n=17)" -#> 19 d NA 3 28 10 "d\n(n=28)" "NA\n(n=10)" +#> first last n gx.sum gy.sum lx ly +#> <fct> <fct> <int> <int> <int> <fct> <fct> +#> 1 c c 5 28 15 "c\n(n=28)" "c\n(n=15)" +#> 2 c a 7 28 32 "c\n(n=28)" "a\n(n=32)" +#> 3 c b 6 28 26 "c\n(n=28)" "b\n(n=26)" +#> 4 c d 6 28 17 "c\n(n=28)" "d\n(n=17)" +#> 5 c NA 4 28 10 "c\n(n=28)" NA +#> 6 a c 6 24 15 "a\n(n=24)" "c\n(n=15)" +#> 7 a a 9 24 32 "a\n(n=24)" "a\n(n=32)" +#> 8 a b 6 24 26 "a\n(n=24)" "b\n(n=26)" +#> 9 a d 1 24 17 "a\n(n=24)" "d\n(n=17)" +#> 10 a NA 2 24 10 "a\n(n=24)" NA +#> 11 b c 4 20 15 "b\n(n=20)" "c\n(n=15)" +#> 12 b a 8 20 32 "b\n(n=20)" "a\n(n=32)" +#> 13 b b 5 20 26 "b\n(n=20)" "b\n(n=26)" +#> 14 b d 2 20 17 "b\n(n=20)" "d\n(n=17)" +#> 15 b NA 1 20 10 "b\n(n=20)" NA +#> 16 d a 8 28 32 "d\n(n=28)" "a\n(n=32)" +#> 17 d b 9 28 26 "d\n(n=28)" "b\n(n=26)" +#> 18 d d 8 28 17 "d\n(n=28)" "d\n(n=17)" +#> 19 d NA 3 28 10 "d\n(n=28)" NA ds |> sankey_ready("first", "last", numbers = "percentage") #> # A tibble: 19 × 7 -#> first last n gx.sum gy.sum lx ly -#> <fct> <chr> <int> <int> <int> <fct> <fct> -#> 1 c a 7 28 32 "c\n(28%)" "a\n(32%)" -#> 2 c b 6 28 26 "c\n(28%)" "b\n(26%)" -#> 3 c c 5 28 15 "c\n(28%)" "c\n(15%)" -#> 4 c d 6 28 17 "c\n(28%)" "d\n(17%)" -#> 5 c NA 4 28 10 "c\n(28%)" "NA\n(10%)" -#> 6 a a 9 24 32 "a\n(24%)" "a\n(32%)" -#> 7 a b 6 24 26 "a\n(24%)" "b\n(26%)" -#> 8 a c 6 24 15 "a\n(24%)" "c\n(15%)" -#> 9 a d 1 24 17 "a\n(24%)" "d\n(17%)" -#> 10 a NA 2 24 10 "a\n(24%)" "NA\n(10%)" -#> 11 b a 8 20 32 "b\n(20%)" "a\n(32%)" -#> 12 b b 5 20 26 "b\n(20%)" "b\n(26%)" -#> 13 b c 4 20 15 "b\n(20%)" "c\n(15%)" -#> 14 b d 2 20 17 "b\n(20%)" "d\n(17%)" -#> 15 b NA 1 20 10 "b\n(20%)" "NA\n(10%)" -#> 16 d a 8 28 32 "d\n(28%)" "a\n(32%)" -#> 17 d b 9 28 26 "d\n(28%)" "b\n(26%)" -#> 18 d d 8 28 17 "d\n(28%)" "d\n(17%)" -#> 19 d NA 3 28 10 "d\n(28%)" "NA\n(10%)" +#> first last n gx.sum gy.sum lx ly +#> <fct> <fct> <int> <int> <int> <fct> <fct> +#> 1 c c 5 28 15 "c\n(28%)" "c\n(15%)" +#> 2 c a 7 28 32 "c\n(28%)" "a\n(32%)" +#> 3 c b 6 28 26 "c\n(28%)" "b\n(26%)" +#> 4 c d 6 28 17 "c\n(28%)" "d\n(17%)" +#> 5 c NA 4 28 10 "c\n(28%)" NA +#> 6 a c 6 24 15 "a\n(24%)" "c\n(15%)" +#> 7 a a 9 24 32 "a\n(24%)" "a\n(32%)" +#> 8 a b 6 24 26 "a\n(24%)" "b\n(26%)" +#> 9 a d 1 24 17 "a\n(24%)" "d\n(17%)" +#> 10 a NA 2 24 10 "a\n(24%)" NA +#> 11 b c 4 20 15 "b\n(20%)" "c\n(15%)" +#> 12 b a 8 20 32 "b\n(20%)" "a\n(32%)" +#> 13 b b 5 20 26 "b\n(20%)" "b\n(26%)" +#> 14 b d 2 20 17 "b\n(20%)" "d\n(17%)" +#> 15 b NA 1 20 10 "b\n(20%)" NA +#> 16 d a 8 28 32 "d\n(28%)" "a\n(32%)" +#> 17 d b 9 28 26 "d\n(28%)" "b\n(26%)" +#> 18 d d 8 28 17 "d\n(28%)" "d\n(17%)" +#> 19 d NA 3 28 10 "d\n(28%)" NA +data.frame( + g = sample(LETTERS[1:2], 100, TRUE), + first = REDCapCAST::as_factor(sample(letters[1:4], 100, TRUE)), + last = sample(c(TRUE, FALSE, FALSE), 100, TRUE) +) |> + sankey_ready("first", "last") +#> # A tibble: 8 × 7 +#> first last n gx.sum gy.sum lx ly +#> <fct> <fct> <int> <int> <int> <fct> <fct> +#> 1 a FALSE 21 29 61 "a\n(n=29)" "FALSE\n(n=61)" +#> 2 a TRUE 8 29 39 "a\n(n=29)" "TRUE\n(n=39)" +#> 3 d FALSE 12 22 61 "d\n(n=22)" "FALSE\n(n=61)" +#> 4 d TRUE 10 22 39 "d\n(n=22)" "TRUE\n(n=39)" +#> 5 b FALSE 13 26 61 "b\n(n=26)" "FALSE\n(n=61)" +#> 6 b TRUE 13 26 39 "b\n(n=26)" "TRUE\n(n=39)" +#> 7 c FALSE 15 23 61 "c\n(n=23)" "FALSE\n(n=61)" +#> 8 c TRUE 8 23 39 "c\n(n=23)" "TRUE\n(n=39)" 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 diff --git a/reference/getfun.html b/reference/getfun.html index 249d24c..3470d7a 100644 --- a/reference/getfun.html +++ b/reference/getfun.html @@ -132,7 +132,7 @@ #> z$qr <- NULL #> z #> } -#> <bytecode: 0x55a6d152e008> +#> <bytecode: 0x5645c3677098> #> <environment: namespace:stats>
diff --git a/reference/ggeulerr.html b/reference/ggeulerr.html new file mode 100644 index 0000000..c18c607 --- /dev/null +++ b/reference/ggeulerr.html @@ -0,0 +1,94 @@ + +Area proportional venn diagrams — ggeulerr • freesearcheR + Skip to contents + + +
+
+
+ +
+

THis is slightly modified from https://gist.github.com/danlooo/d23d8bcf8856c7dd8e86266097404ded

+

This functions uses eulerr::euler to plot area proportional venn diagramms +but plots it using ggplot2

+
+ +
+

Usage

+
ggeulerr(combinations, show_quantities = TRUE, show_labels = TRUE, ...)
+
+ +
+

Arguments

+ + +
combinations
+

set relationships as a named numeric vector, matrix, or +data.frame(See eulerr::euler)

+ + +
show_quantities
+

whether to show number of intersecting elements

+ + +
show_labels
+

whether to show set names

+ + +
...
+

further arguments passed to eulerr::euler

+ +
+ +
+ + +
+ + + + + + + diff --git a/reference/index.html b/reference/index.html index 72ef037..f9b4c8d 100644 --- a/reference/index.html +++ b/reference/index.html @@ -139,7 +139,7 @@ plot_ridge() create_plot() plot_hbars() plot_violin() plot_scatter() sankey_ready() plot_sankey() -
Title
+
Plot nice ridge plot
data_summary_ui() data_summary_server() @@ -220,6 +220,12 @@
GGplot default theme for plotting in Shiny
+ ggeulerr() + +
+
Area proportional venn diagrams
+
+ grepl_fix()
@@ -298,6 +304,12 @@
Wrapper to pivot gtsummary table data to long for plotting
+ missing_fraction() + +
+
Get missingsness fraction
+
+ modify_qmd()
@@ -322,6 +334,18 @@
Regression coef plot from gtsummary. Slightly modified to pass on arguments
+ plot_euler() + +
+
Easily plot euler diagrams
+
+ + plot_euler_single() + +
+
Easily plot single euler diagrams
+
+ plot_sankey_single()
diff --git a/reference/line_break.html b/reference/line_break.html index e0d3a43..98bab8f 100644 --- a/reference/line_break.html +++ b/reference/line_break.html @@ -70,8 +70,8 @@ Default is FALSE, only splitting at spaces.

Examples

"Lorem ipsum... you know the routine" |> line_break()
 #> [1] "Lorem ipsum... you\nknow the routine"
-paste(sample(letters[1:10], 100, TRUE), collapse = "") |> line_break(fixed=TRUE)
-#> [1] "caahdfjbagdgcagcgggcbfadgdgafjibiiaaccjiehcafjibhfjdicgbcjdfijbjiejedbbdbejdhbachfijieffaghcjjjjchda"
+paste(sample(letters[1:10], 100, TRUE), collapse = "") |> line_break(fixed = TRUE)
+#> [1] "jdhegaaegchcffhcedhcgghhdifbfjheabacfibfhecjigehjdgdjfaffbfhfcghgefddidiihdhbgedgdgaahcjicggefhgfjhb"