class: center, middle, inverse, title-slide # Practical R:
Introductions
### Abhijit Dasgupta ### BIOF 339 --- layout: true <div class="my-header"> <span>BIOF339</span></div> </div> --- # Is there a difference in ozone between months .pull-left[ ```r summary(aov(Ozone ~ Month, data=airquality)) ``` ``` #> Df Sum Sq Mean Sq F value Pr(>F) #> Month 1 3387 3387 3.171 0.0776 . #> Residuals 114 121756 1068 #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> 37 observations deleted due to missingness ``` Whoops!! Only 1 df but 5 months!! This is doing ANCOVA/Regression ] -- .pull-right[ ```r summary(aov(Ozone~factor(Month), data=airquality)) ``` ``` #> Df Sum Sq Mean Sq F value Pr(>F) #> factor(Month) 4 29438 7359 8.536 4.83e-06 *** #> Residuals 111 95705 862 #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> 37 observations deleted due to missingness ``` `factor` can convert a numerical or character variable into a categorical variable ] -- > I'm doing a lot of things on the fly here. We'll work through these at a saner pace in the coming weeks. Don't panic!! Breathe!!!