Skip to contents
loading...

Extract the information contained in a nls object into a rectangular table as it could be obtained by broom::tidy(). Here, the table is nicely formatted as an (almost) publication-ready form (good for informal reports, notebooks, etc).

Usage

# S3 method for nls
tabularise_tidy(data, ..., kind = "ft", env = parent.frame())

Arguments

data

A nls object

...

arguments of tabularise_coef.summary.nls()

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$tidy(chick1_logis)

Nonlinear least squares logistic model

NA

Term

Estimate

Standard Error

tobs. value

p value

Asym

937.0

465.868

2.01

7.52·10-02

.

xmid

35.2

8.312

4.24

2.18·10-03

**

scal

11.4

0.905

12.60

5.08·10-07

***

0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05

tabularise::tabularise$tidy(chick1_logis, lang = "fr")

Modèle non linéaire logistique

NA

Terme

Valeur estimée

Ecart type

Valeur de tobs.

Valeur de p

Asym

937.0

465.868

2.01

7.52·10-02

.

xmid

35.2

8.312

4.24

2.18·10-03

**

scal

11.4

0.905

12.60

5.08·10-07

***

0 <= '***' < 0.001 < '**' < 0.01 < '*' < 0.05