effectsize icon indicating copy to clipboard operation
effectsize copied to clipboard

new `print_md.rules`

Open mattansb opened this issue 2 years ago • 1 comments

Should return something like this:

image

Inputs:

  • Rules
  • title (optional)
  • value name (optional)

This can then be used to generate the docs / vignettes more easily.

mattansb avatar Aug 07 '22 10:08 mattansb

library(effectsize)

x <- rules(c(0.2, 0.5), c("small", "medium", "large"), name = "ziggi")

print_md(x)
#> 
#> `ziggi`:
#> - **x <= 0.2** - Small
#> - **0.2 < x <= 0.5** - Medium
#> - **0.5 < x** - Large

print_md(x, "Z")
#> 
#> `ziggi`:
#> - **Z <= 0.2** - Small
#> - **0.2 < Z <= 0.5** - Medium
#> - **0.5 < Z** - Large

print_md(x, "Z", "Ziggi (2024) `{.rn}`:")
#> 
#> Ziggi (2024) `ziggi`:
#> - **Z <= 0.2** - Small
#> - **0.2 < Z <= 0.5** - Medium
#> - **0.5 < Z** - Large

Created on 2023-12-12 with reprex v2.0.2

Now to just use it everywhere...

mattansb avatar Dec 12 '23 21:12 mattansb