Learning Rmarkdown
Introduction
We aimed at assessing the performance of different diet on chick weight. We use rmarkdown to automate the report that contain formatted plain text, code,figures, table and reference As mentioned previous, an R Markdown file is simply a plain text with and .Rmd
extension.
Data
We use the data ChickWeight
from the base R dataset package. It has four variables;
weight
: a numeric vector with the body weight of the chick in gmTime
: a numeric vector with the number of days since the birth when the record begin at day zeroChick
: an ordered factor with levels that group chicks with the same diet togetherDiet
: A factor with levels 1–4 indicating the type of feed used for experimental
We first need to load the tidyverse package developed by Hadley Wickham and others (Wickham 2017). We load using the require()
function and used ggplot to make figure 1.
Reference
Wickham, Hadley. 2017. Tidyverse: Easily Install and Load the ’tidyverse’. https://CRAN.R-project.org/package=tidyverse.