data_snapshot: Data Snapshot for Two Numeric Variables

Description Usage Arguments Details Value Examples

View source: R/datasnapshot.R

Description

Function provides snapshot of the linear relationship between two numeric variables (scatterplot and adjusted r value), as well as some summary statistics for the two numeric variables.

Usage

1

Arguments

data

needs to be a data frame (for e.g., a tibble)

x

This input is a numeric variable from a tibble or dataframe, for e.g. column with numeric values

y

This input is a numeric variable from a tibble or dataframe, for e.g. column with numeric values

Details

When given two numeric variables, x and y, this function produces summary statistics (max, min, median and mean) and a plot that allows the user to get a quick snapshot of the data and in particular their linear relationship (if any). Generally, the adjusted r squared value, a value between 0 and 1 (displayed as a percentage), represents the proportion of variance observed for a dependent variable explained by the independent variable in a linear regression model.

Value

This function returns summary statistics tables for numeric variables, a scatterplot and adjusted R squared value

Examples

1
2
data_snapshot(mtcars, hp, mpg)
data_snapshot(gapminder::gapminder, lifeExp, gdpPercap)

hansudd/AssnB2 documentation built on Dec. 20, 2021, 2:48 p.m.