Learn R Programming

formula.tools (version 1.7.1)

as.character.formula: Converts a formula to character

Description

Convers a formula to character representaion

Usage

# S3 method for formula
as.character(x, ...)

Arguments

x

formula object

...

further arguments passed to or from other methods.

Value

A character vector

Details

Coerces formula to a character by deparsing.

See Also

deparse

Examples

Run this code
# NOT RUN {
  as.character( y ~ mx +  b )

## The function is currently defined as
function(x)
  Reduce( paste, deparse(x) )
  
# }

Run the code above in your browser using DataLab