peak_to_poly: Convert Time Series to Polynomial

View source: R/polynomial.R

peak_to_polyR Documentation

Convert Time Series to Polynomial

Description

Convert Time Series to Polynomial

Usage

peak_to_poly(df, coeff, path.data = NULL, show.progress = FALSE)

Arguments

df

The resulting tibble of the function avg_peaks(). See ?avg_peaks for more details.

coeff

A numerical value indicating the number of coefficients the model used to fit on the time series data should have.

path.data

A string character defining where to save the results as *.csv and *.R. If NULL, data is not stored in files. Default: NULL.

show.progress

A logical value indicating if progress should be printed to the console. Default: FALSE.

Value

A list with the length equal to the number of unique species within df containing the fitted models.

Examples

# Using the forceR::peaks.df.100.avg dataset:

# define the number of coefficients the polynomial models should have
number_of_coeffs = 4

# convert curves to polynomial models
models <- peak_to_poly(df = forceR::peaks.df.100.avg,
                        coeff = number_of_coeffs)

models

forceR documentation built on March 7, 2023, 7:15 p.m.