Last active
March 28, 2017 05:17
-
-
Save jonathon-love/9c44588d6c6b771d433b8505fee397a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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