Description Usage Arguments Details Value Examples
plotAvgTemperaturesByYear
plots the average temperature by year in a line graph.
1 | plotAvgTemperaturesByYear(avg_temperatures, place = "Nottingham")
|
avg_temperatures |
Data.frame. Has years and their corresponding average temperature. |
place |
String. It's assumed this function is called with the nottem built-in dataset. This dataset records the temperatures in Nottingham. Nottingham is the default argument. You can override this argument if the need arises. |
This function plots the average temperature by year. It also automatically updates the title so there's no need to specify the title yourself.
ggplot object
1 2 3 | avg_temperatures <- data.frame(year = c(1920, 1921, 1922, 1923),
avgTemperature = c(5, 10, 8, 9))
plotAvgTemperaturesByYear(avg_temperatures)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.