gapminder_lm_table: Create a table for fitted linear model between variables...

Description Usage Arguments Value Examples

Description

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.

Usage

1
gapminder_lm_table(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".

Value

tbl_df

Examples

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

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