gapminder_lm_plot: Draw a plot to show how well pop/lifeExp/gdpPercap and year...

Description Usage Arguments Examples

Description

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.

Usage

1
gapminder_lm_plot(countryName, x = "year", y = "pop")

Arguments

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".

Examples

1
2
gapminder_lm_plot("Canada")
gapminder_lm_plot("Canada","year","lifeExp")

LinaQiu/packageForGapminder documentation built on May 8, 2019, 11:20 p.m.