Normal text, just perfectly normal text, nothing special here. If we want to jazz it up a bit we can use italics for example, or even bold text!
Making a list of other things we can do:
And tables are quite straightforward as well:
| First Header | Second Header | Third Header |
|---|---|---|
| Content Cell | Content Cell | More stuff |
First letās get some data, one of the builtin datasets will do, iris sepal lentgh is a favourite.
From the documentation: > Fisherās or Andersonās iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica.
Here is a quick look at the data set, to give you a flavour:
head(iris)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
## 3 4.7 3.2 1.3 0.2 setosa
## 4 4.6 3.1 1.5 0.2 setosa
## 5 5.0 3.6 1.4 0.2 setosa
## 6 5.4 3.9 1.7 0.4 setosa
Just quickly, there are is 150 cases or rows in the dataset, and the mean petal lenght is 3.758.
Now we can explore the data visually a bit, like plotting the petal length by its width:
plot(iris$Petal.Length, iris$Petal.Width,
xlab=c("Petal lenght"),
ylab=c("Petal width"),
main="Iris Data")
How about a linear regression line in the chart? And colour coding the data points by species? First letās use a linear model and see what the intercept and slope are?
lm(iris$Petal.Width ~ iris$Petal.Length )$coefficients
## (Intercept) iris$Petal.Length
## -0.3630755 0.4157554
OK, not we can do the same plot as before, but add colours and the line. And because this is pretty straightforward, I wonāt bore you with the code, but only show you the plot instead: