expFit: Exponential Fit and plot of data

Description Usage Arguments Details See Also Examples

Description

Fit a exponential model to two variables, return basic output about the model, and plot the model.

Usage

1
expFit(simpleformula, data, xlab = NULL, ylab = NULL)

Arguments

simpleformula

a designation for the model formula in y ~ x notation. Must be in formula notation–see details.

data

a data frame in which to evaluate formulas.

xlab

optional. Text for x-axis title label for produced graph.

ylab

optional. Text for y-axis title label for produced graph.

Details

This function is one of a group of functions that take a specific input in the form of y ~ x, following (in-part) the mosaic package formula notation. However, only simple formulas are allowed with no grouping parameter, nor multiple predictor variables.

See Also

linFit logisticFit tripleFit

Examples

1
2
3
4
5
data(wolf)
wolf <- wolf %>%
  mutate(Time = Year - min(Year))
expFit(Number ~ Time, data=wolf)
expFit(Number ~ Time, data=wolf, xlab="Years since 1995", ylab="Number of Wolves")

MichaelJMahometa/OnRampsR2 documentation built on Feb. 12, 2020, 12:32 a.m.