general.poly.fit: General polynomial fitting function

Description Usage Arguments Value

View source: R/general.poly.fit.R

Description

Operates on a dataframe or dataframe subset and does a polynomial fit between two of the columns.

Usage

1
general.poly.fit(df, x.col, y.col, poly.degree = 2)

Arguments

df

dataframe or dataframe group

x.col

name of the x column to be fit; must be a string

y.col

name of the y column to be fit; must be a string

poly.degree

optional; use to specify the degree of the polynomial model. Default is 2. Available options are 2 or 3.

Value

Returns a one-row dataframe with all grouping variables, and the parameters of the polynomial model as columns of the dataframe.


ctriandafillou/cat.extras documentation built on Aug. 27, 2020, 11:04 p.m.