# Make a factor of Species.
iris$Species <- factor(iris$Species)
# The left hand side contains two response variables,
# so two aov's will be conducted, i.e. "Sepal.Width"
# and "Sepal.Length" in response to the explanatory variable: "Species".
f_aov_out <- f_aov(Sepal.Width + Sepal.Length ~ Species,
data = iris,
# Save output in MS Word file (Default is console)
output_type = "word",
# Do boxcox transformation for non-normal residual (Default is bestnormalize)
transformation = "boxcox",
# Do not automatically open the file.
open_generated_files = FALSE
)
# Print output to the console.
print(f_aov_out)
# Plot residual plots.
plot(f_aov_out)
#To print rmd output set chunck option to results = 'asis' and use cat().
f_aov_rmd_out <- f_aov(Sepal.Width ~ Species, data = iris, output_type = "rmd")
cat(f_aov_rmd_out$rmd)
Run the code above in your browser using DataLab