plot_linreg: Scatterplot with linear regression line and formula

Description Usage Arguments Examples

View source: R/plot_linreg.R

Description

This function allows you to plot a scatterplot using a formula interface with the model-formula and R2 value on top

Usage

1
plot_linreg(df, frml, title = "", method = "lm", se = F, stat.frml = y ~ x)

Arguments

df

data.frame, A data.frame that is used to plot the variables

frml

formula, A formula object for plotting the variables in the form y ~ x

title

string, Title of the resulting plot

method

string, method that should be used to draw the fitting line

se

boolean, should a confidence interval be drawn around the fitting line?

stat.frmle

formula, the formula that is used to calculate the model-formula displayed on the plot

Examples

1
2
3
4
5
6
plot_linreg(df.plot,
frml = T_mean ~ elevation,
title = 'Scatterplot',
method = 'lm',
se = T,
stat.frml = y ~ x)

sitscholl/rebecka_package documentation built on Aug. 25, 2020, 4:20 a.m.