Learn R Programming

vannstats (version 1.2.1.3)

scatter: Simplified Scatterplot

Description

This function plots a scatterplot (scatter) on a given data frame, and adds a fit-line to the data.

Usage

scatter(df, var1, var2)

Arguments

df

data frame to read in.

var1

the dependent/outcome variable, \(Y\).

var2

the independent/predictor variable, \(X\).

Examples

Run this code
# NOT RUN {
data <- mtcars

scatter(data,mpg,wt)
# }

Run the code above in your browser using DataLab