powered by
Create a qscatter plot similar to Stata
qscatter(dataset, xvar, yvar, lev = "", fun = "mean", bins = 20)
Data to plot (data.frame or tibble)
Character indicating the variable to display along the X-axis of the plot
Character indicating the variable to display along the Y-axis of the plot
Level in yvar to use if yvar is of type character of factor. If lev is empty then the first level is used
Summary measure to apply to both the x and y variable
Number of bins to use
# NOT RUN { qscatter(diamonds, "price", "carat") qscatter(titanic, "age", "survived") # }
Run the code above in your browser using DataLab