best.fit.line: Create Scatterplot with User-Defined Line of Best-Fit

Description Usage Arguments Value Author(s) Examples

Description

Scatterplot with intercept and slope of ‘best fit’ line specified by user.

Usage

1

Arguments

df

A dataframe comprising 2 numeric vectors, with values of X in the first column and values of Y in the second.

a

The intercept for the line of fit to be added to a scatterplot of Y given X

b

The slope for the line of fit to be added to a scatterlot of Y given X

Value

Returns a scatterplot, with added line of fit with intercept a and slope b. Also reports the equation of line being fitted, plus total sum of squares for that line.

Author(s)

Paul Williamson

Examples

1
best.fit.line(survey[ , c("Height", "Income")], 28000, -20)

DrPaulWilliamson/ENVS450 documentation built on May 9, 2019, 3:23 a.m.