Skip to content

Commit bdf83da

Browse files
Matías Castillo AguilarMatías Castillo Aguilar
authored andcommitted
-
1 parent 79928f8 commit bdf83da

File tree

3 files changed

+1034
-1
lines changed

3 files changed

+1034
-1
lines changed

README.Rmd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,29 @@ translates into this:
179179

180180
> The effect of vitamin C on tooth growth was explored in Guinea Pigs, were the group using orange juice (OJ) demonstrated similar values (*M* = 26.06, *SD* = 2.66) than vitamin C (VC) group (*M* = 26.14, *SD* = 4.8) in tooth length (TL) at 2 miligrams/day. However, at doses of 0.5 miligrams/day, the OJ group did show greater TL (*M* = 13.23, *SD* = 4.46) than VC group (*M* = 7.98, *SD* = 2.75).
181181
182+
You can also set your own custom expressions using glue syntax like this:
183+
184+
```{r}
185+
cent_disp(
186+
x = data$len,
187+
str.a = "The median for length was {median} mm (MAD = {mad}, IQR = {IQR})",
188+
k = 1 # For 1 decimal places
189+
)
190+
```
191+
192+
It allows you to use any function available in your global environment or in attached packages, even custom functions:
193+
194+
```{r}
195+
q25 <- function(i) quantile(i, 0.25)[[1L]]
196+
q75 <- function(j) quantile(j, 0.75)[[1L]]
197+
198+
cent_disp(
199+
x = data$len,
200+
str.a = "The median for length was {median} mm (IQR = [{q25}, {q75}])",
201+
k = 1
202+
)
203+
```
204+
182205
## Paired samples design
183206

184207
For paired designs you need to set `paired = TRUE`, and then, based on the numbers of groups detected after removing missing values, the test will run depending on the parameters stablished.

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,39 @@ translates into this:
178178

179179
> The effect of vitamin C on tooth growth was explored in Guinea Pigs, were the group using orange juice (OJ) demonstrated similar values (*M* = 26.06, *SD* = 2.66) than vitamin C (VC) group (*M* = 26.14, *SD* = 4.8) in tooth length (TL) at 2 miligrams/day. However, at doses of 0.5 miligrams/day, the OJ group did show greater TL (*M* = 13.23, *SD* = 4.46) than VC group (*M* = 7.98, *SD* = 2.75).
180180
181+
You can also set your own custom expressions using glue syntax like this:
182+
183+
184+
```r
185+
cent_disp(
186+
x = data$len,
187+
str.a = "The median for length was {median} mm (MAD = {mad}, IQR = {IQR})",
188+
k = 1 # For 1 decimal places
189+
)
190+
```
191+
192+
```
193+
## The median for length was 19.2 mm (MAD = 9, IQR = 12.2)
194+
```
195+
196+
It allows you to use any function available in your global environment or in attached packages, even custom functions:
197+
198+
199+
```r
200+
q25 <- function(i) quantile(i, 0.25)[[1L]]
201+
q75 <- function(j) quantile(j, 0.75)[[1L]]
202+
203+
cent_disp(
204+
x = data$len,
205+
str.a = "The median for length was {median} mm (IQR = [{q25}, {q75}])",
206+
k = 1
207+
)
208+
```
209+
210+
```
211+
## The median for length was 19.2 mm (IQR = [13.1, 25.3])
212+
```
213+
181214
## Paired samples design
182215

183216
For paired designs you need to set `paired = TRUE`, and then, based on the numbers of groups detected after removing missing values, the test will run depending on the parameters stablished.
@@ -672,7 +705,7 @@ library(deepdep)
672705
plot_dependencies('writR', local = TRUE, depth = 3)
673706
```
674707

675-
![](README_files/figure-html/unnamed-chunk-13-1.svg)<!-- -->
708+
![](README_files/figure-html/unnamed-chunk-15-1.svg)<!-- -->
676709

677710
## Acknowledgments
678711

0 commit comments

Comments
 (0)