Description Usage Arguments Details Value See Also Examples

View source: R/compare_means.R

Compare means for two or more variables

1 2 3 | ```
compare_means(dataset, var1, var2, samples = "independent",
alternative = "two.sided", conf_lev = 0.95, comb = "",
adjust = "none", test = "t", data_filter = "")
``` |

`dataset` |
Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant |

`var1` |
A numeric variable or factor selected for comparison |

`var2` |
One or more numeric variables for comparison. If var1 is a factor only one variable can be selected and the mean of this variable is compared across (factor) levels of va1r |

`samples` |
Are samples independent ("independent") or not ("paired") |

`alternative` |
The alternative hypothesis ("two.sided", "greater" or "less") |

`conf_lev` |
Span of the confidence interval |

`comb` |
Combinations to evaluate |

`adjust` |
Adjustment for multiple comparisons ("none" or "bonf" for Bonferroni) |

`test` |
t-test ("t") or Wilcox ("wilcox") |

`data_filter` |
Expression entered in, e.g., Data > View to filter the dataset in Radiant. The expression should be a string (e.g., "price > 10000") |

See https://radiant-rstats.github.io/docs/basics/compare_means.html for an example in Radiant

A list of all variables defined in the function as an object of class compare_means

`summary.compare_means`

to summarize results

`plot.compare_means`

to plot results

1 2 | ```
result <- compare_means("diamonds","cut","price")
result <- diamonds %>% compare_means("cut","price")
``` |

radiant.basics documentation built on May 29, 2017, 12:23 p.m.

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.