Description Usage Arguments Value Examples

Comparison for columns of factors for more than 2 groups with post-hoc

1 2 3 4 5 6 7 8 9 10 11 12 13 |

`data` |
name of data set (tibble/data.frame) to analyze. |

`dep_vars` |
vector of column names. |

`indep_var` |
name of grouping variable, has to translate to 2 groups. |

`round_p` |
level for rounding p-value. |

`round_desc` |
number of significant digits for rounding of descriptive stats |

`pretext` |
for function formatP |

`mark` |
for function formatP |

`singleline` |
Put all group levels in a single line? |

`spacer` |
Text element to indent levels, defaults to " ". |

`linebreak` |
place holder for newline. |

`prettynum` |
Apply prettyNum to results? |

A tibble with variable names, descriptive statistics, and p-value, number of rows is number of dep_vars.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# Separate lines for each factor level:
compare_n_qualvars(
data = mtcars, dep_vars = c("am", "cyl", "carb"), indep_var = "gear",
spacer = " "
)
# All levels in one row but with linebreaks:
compare_n_qualvars(
data = mtcars, dep_vars = c("am", "cyl", "carb"), indep_var = "gear",
singleline = TRUE
)
# All levels in one row, separateted by ";":
compare_n_qualvars(
data = mtcars, dep_vars = c("am", "cyl", "carb"), indep_var = "gear",
singleline = TRUE, linebreak = "; "
)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.