Description Usage Arguments Value Examples
gapminder_lm_table 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 the actual pop/lifeExp/gdpPercap value and the corresponding predicted values which we can compute through the fitted linear model. Besides, it will also show the difference between actual pop/lifeExp/gdpPercap value and its predicted value.
1 | gapminder_lm_table(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". |
tbl_df
1 2 | gapminder_lm_table("Canada")
gapminder_lm_table("Canada","year","lifeExp")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.