Description Usage Arguments Examples
gapminder_lm_plot is used to show how well pop/lifeExp/gdpPercap and year of a specific country in gapminder dataset fit the linear model. After using linear model to fit the data, it will display how actual value of pop/lifeExp/gdpPercap changes with year, as well as how predicted value of pop/lifeExp/gdpPercap changes with year.
1 | gapminder_lm_plot(countryName, x = "year", y = "pop")
|
countryName |
character this should be the name of country that you want to explore in gapminder dataset. |
x |
character default value would be "year" here. |
y |
character this could be one of the three variables(pop/lifeExp/gdpPercap) in gapminder dataset. Default value of y is "pop". |
1 2 | gapminder_lm_plot("Canada")
gapminder_lm_plot("Canada","year","lifeExp")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.