I am writing a paragraph using plain text. The R Markdown makes use of YAML. I am using the following syntax to italicise, bold, superscript2, hyperlink to my Github and write inline equations using Latex such as \(y = m\mu + \sigma\).
I use double tab indents for the sub-items.
I manually enter a table like this
Table 1: Mean and Median for Speed and Distance
| Variable | Mean | Median |
|---|---|---|
| Speed | 15.40 | 15.0 |
| Distance | 42.98 | 36.0 |
library(knitr)
Warning message:
In readChar(file, size, TRUE) : truncating string with embedded nuls
knitr::kable(anscombe, caption = "Anscombe's Quartet Data")
Table: Anscombe's Quartet Data
| x1| x2| x3| x4| y1| y2| y3| y4|
|--:|--:|--:|--:|-----:|----:|-----:|-----:|
| 10| 10| 10| 8| 8.04| 9.14| 7.46| 6.58|
| 8| 8| 8| 8| 6.95| 8.14| 6.77| 5.76|
| 13| 13| 13| 8| 7.58| 8.74| 12.74| 7.71|
| 9| 9| 9| 8| 8.81| 8.77| 7.11| 8.84|
| 11| 11| 11| 8| 8.33| 9.26| 7.81| 8.47|
| 14| 14| 14| 8| 9.96| 8.10| 8.84| 7.04|
| 6| 6| 6| 8| 7.24| 6.13| 6.08| 5.25|
| 4| 4| 4| 19| 4.26| 3.10| 5.39| 12.50|
| 12| 12| 12| 8| 10.84| 9.13| 8.15| 5.56|
| 7| 7| 7| 8| 4.82| 7.26| 6.42| 7.91|
| 5| 5| 5| 8| 5.68| 4.74| 5.73| 6.89|
summary(cars)
speed dist
Min. : 4.0 Min. : 2.00
1st Qu.:12.0 1st Qu.: 26.00
Median :15.0 Median : 36.00
Mean :15.4 Mean : 42.98
3rd Qu.:19.0 3rd Qu.: 56.00
Max. :25.0 Max. :120.00
Warning message:
In readChar(file, size, TRUE) : truncating string with embedded nuls
I am going to report my R code inline by bracketing my work in two single quotes. For example, the mean speed was 15.4, *SD* = 5.29 with a sample size *n* = 50.