View source: R/formula-utils.R

reop_formula | R Documentation |

`model.frame()`

assumes that certain operations (e.g. `/`

, `*`

, `^`

) have special
meanings. These can be inhibited using `I()`

. This function inserts `I()`

into
a formula when encountering a specified operator or parens.

```
reop_formula(x, ops = c("/", "*", "^"))
```

`x` |
a formula (or a call of length 2 or 3, for recursive processing of formulas). Other objects are returned unchanged. |

`ops` |
a vector of character representions of operators to be inhibited. |

a formula with `I()`

inserted where required to inhibit interpretation/conversion.

```
reop_formula(y ~ x * y)
reop_formula(y ~ (x * y))
reop_formula(y ~ x ^ y)
reop_formula(y ~ x * y ^ z)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.