knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warnings = F, message = F )
For your independent project you need to carry out relevant model diagnostics. If your major analysis only requires t-tests, you should re-fit at least one of your t-tests a linear model using lm() and check for normality and homogeneity of variance using relevant techniques.
The following script is just a place holder. For full information on model diangostics see the the (diagnostics tutorial](https://brouwern.github.io/mammalsmilk/articles/g-linear_reg_diagnostics.html) in the mammalsmilk package.
In this the mammalsmilkRA repository I have split up the analysis into several subscripts:
These can be combined if you want.
library(dplyr) # for exploratory analyses library(ggpubr) # plotting using ggplto2 library(cowplot) library(lme4) library(arm) library(stringr) library(bbmle) library(plotrix) ##std.error function for SE library(psych) library(here)
file. <- "Appendix-2-Analysis-Data_mammalsmilkRA.csv" path. <- here("/inst/extdata/",file.) milk <- read.csv(path., skip = 3) genus_spp_subspp_mat <- milk$spp %>% str_split_fixed(" ", n = 3) milk$genus <- genus_spp_subspp_mat[,1]
head(milk) tail(milk) summary(milk)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.