
Create a rich-formatted table using the coefficients of the nls object
Source:R/tabularise.nls.R
tabularise_coef.nls.Rd
This method extracts and formats the coefficients from an nls object,
similar to stats::coef()
, but in flextable object.
Usage
# S3 method for nls
tabularise_coef(
data,
header = TRUE,
title = NULL,
equation = header,
lang = getOption("data.io_lang", "en"),
...,
kind = "ft",
env = parent.frame()
)
Arguments
- data
An nls object.
- header
If
TRUE
(by default), add a title to the table.- title
If
TRUE
, add a title to the table header. Default to the same value than header, except outside of a chunk where it isFALSE
if a table caption is detected (tbl-cap
YAML entry).- equation
If
TRUE
(by default), add the equation of the model- lang
The language to use. The default value can be set with, e.g.,
options(data.io_lang = "fr")
for French.- ...
Additional arguments.
- kind
The kind of table to produce: "tt" for tinytable, or "ft" for flextable (default).
- env
The environment where to evaluate lazyeval expressions (unused for now).
Value
A flextable object that you can print in different forms or rearrange with the {flextable} functions.
Examples
data("ChickWeight", package = "datasets")
chick1 <- ChickWeight[ChickWeight$Chick == 1, ]
# Adjust a logistic curve
chick1_logis <- nls(data = chick1, weight ~ SSlogis(Time, Asym, xmid, scal))
tabularise::tabularise$coef(chick1_logis)
Nonlinear least squares logistic model
NA
Asym
xmid
scal
937
35.2
11.4