Learn R Programming

BayesTools (version 0.3.0)

formula_add_intercept: Add an Intercept to a Formula

Description

Converts a no-intercept formula to the corresponding formula with an intercept while preserving the formula environment. Top-level no-intercept encodings such as - 1, + 0, and 0 + are removed without editing transformed calls such as I(x - 1) or offset(x - 1).

Usage

formula_add_intercept(formula)

Value

A formula object with an intercept.

Arguments

formula

a formula object.