This lesson is still being designed and assembled (Pre-Alpha version)

Understanding Open and Reproducible Science: Rmd Exercise 3

## 1 ```{r chunk1} print("This is the first chunk.") ``` ## 2 We are looking at some information from the dataset "Titanic" that is available within R. ```{r chunk2} print("This code is hidden.") table1 <- apply(Titanic, c(3, 4), sum) ``` Once you set the chunk options as requested the computations are hidden, but we can refer to the numbers within the text. For example, the percentage of children who survived the Titanic accident was `r round(100*table1[1,2]/sum(table1[1,]),1)`%. ## 3 ```{r chunk3} print("This code is NOT evaluated") ``` ## 4 ```{r chunk4} warning("Do NOT show this warning.") ``` ## 5 ```{r chunk5} table2 <- apply(Titanic, c(2, 4), sum) ``` The percentage of female survivors was X times higher as the percentage of male survivors (provide two decimals).