Learn R Programming

radiant.data (version 1.4.5)

qscatter: Create a qscatter plot similar to Stata

Description

Create a qscatter plot similar to Stata

Usage

qscatter(dataset, xvar, yvar, lev = "", fun = "mean", bins = 20)

Arguments

dataset

Data to plot (data.frame or tibble)

xvar

Character indicating the variable to display along the X-axis of the plot

yvar

Character indicating the variable to display along the Y-axis of the plot

lev

Level in yvar to use if yvar is of type character of factor. If lev is empty then the first level is used

fun

Summary measure to apply to both the x and y variable

bins

Number of bins to use

Examples

Run this code
qscatter(diamonds, "price", "carat")
qscatter(titanic, "age", "survived")

Run the code above in your browser using DataLab