Skip to content

Instantly share code, notes, and snippets.

@jonathon-love
Last active March 28, 2017 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathon-love/9c44588d6c6b771d433b8505fee397a7 to your computer and use it in GitHub Desktop.
Save jonathon-love/9c44588d6c6b771d433b8505fee397a7 to your computer and use it in GitHub Desktop.
---
title: "Untitled"
output: html_document
---
Note that the following requires jmvcore >= 0.5.1
In this tutorial, we will retrieve the values from the following analysis:
```{r ToothGrowth}
jmv::anova(ToothGrowth, 'len', c('supp', 'dose'))
```
So the results object is made up of named objects. We can get the names of these objects with `names()`:
```{r}
results <- jmv::anova(ToothGrowth, 'len', c('supp', 'dose'))
names(results)
```
As can be seen, there are 6 objects making up this results object. Only a single table is visible because the other objects are all hidden (they become visible when different options are set).
The main anova table is `main`, so we can get it, and print it with:
```{r}
table <- results$main
# or
table <- results[['main']]
table
```
We can also get this table as a data frame:
```{r}
as.data.frame(results$main)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment