make_plot_data: Build point and fitted-line data for plotting an sma fit

View source: R/ggplot.sma.R

make_plot_dataR Documentation

Build point and fitted-line data for plotting an sma fit

Description

Internal helper that assembles the data used by ggplot.sma: observed points and fitted (S)MA lines, both on the natural (back-transformed) scale of the original variables.

Usage

make_plot_data(obj, n = 100)

Arguments

obj

An object of class sma.

n

Number of points used to draw each fitted line.

Value

A list with elements points (a data frame of x, y and group), lines (a data frame of the same columns describing the fitted lines) and grouped (a logical flag indicating whether the fit has a group structure).


smatr documentation built on Oct. 7, 2026, 1:08 a.m.