Member-only story

Perform an ANOVA on the PlantGrowth dataset in R

Crystal X
3 min readDec 22, 2024

--

In my last blog post I performed an Analysis of Variance (ANOVA) on a linear regression model of the PlantGrowth dataset, and that post can be read here:- https://tracyrenee61.medium.com/perform-an-anova-on-the-plantgrowth-dataset-in-python-54298229128b

In this post I intend to perform the same procedure, except I will use the R programming language instead. The R programming language is a statistical language, so I did not need to import anty libraries to execute the program, as all of the functions needed are inbuilt into the language.

I have used myCompiler, which is an online compiler. MyCompiler is a good free tool to use, but it does not allow the importing of libraries or datasets, so I have only been able to use the datasets and functions that are inbuilt into the language. Fortunately for me, the PlantGrowth dataset is built into R, so I was able to use it. In addition, all of the functions that I used are built into R as well.

The short script that I wrote in R can be seen below. It is worth nothing the the script for R is significantly shorter than the same code that I wrote in Python:-

--

--

Crystal X
Crystal X

Written by Crystal X

I have over five decades experience in the world of work, being in fast food, the military, business, non-profits, and the healthcare sector.

No responses yet