f_text: Turn RHS of formula into a string/label.

Description Usage Arguments Examples

Description

Equivalent of expr_text() and expr_label() for formulas.

Usage

1
2
3
f_text(x, width = 60L, nlines = Inf)

f_label(x)

Arguments

x

A formula.

width

Width of each line

nlines

Maximum number of lines to extract.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
f <- ~ a + b + bc
f_text(f)
f_label(f)

# Names a quoted with ``
f_label(~ x)
# Strings are encoded
f_label(~ "a\nb")
# Long expressions are collapsed
f_label(~ foo({
  1 + 2
  print(x)
}))

lazyeval documentation built on May 2, 2019, 2:11 a.m.