make_scatter_plot2: Scatter Plot for Numeric Grouped by Categorical

View source: R/see_num_vars.R

make_scatter_plot2R Documentation

Scatter Plot for Numeric Grouped by Categorical

Description

Create a scatter plot to examine relationship between two numeric variables within the categories of a categorical variable.

Usage

make_scatter_plot2(
  data,
  num_var1,
  num_var2,
  grp_var,
  trend = "lm",
  split = FALSE,
  label_fmt = TRUE
)

Arguments

data

dataset that contains the variables

num_var1

name of the numeric variable as a string

num_var2

name of the numeric variable as a string

grp_var

name of the categorical variable as a string

trend

string represents smoothing method to use

split

Boolean to indicate whether categories of the grouping variable should be split into individual plot

label_fmt

Boolean to indicate whether plot labels should be formatted

Value

none

Examples

make_scatter_plot2(ggplot2::diamonds, "carat", "price", "cut")

sarazong/SZRtools documentation built on Feb. 8, 2024, 6:49 a.m.