decorate_code: Creates an object of the class 'with_flair'

Description Usage Arguments Value See Also Examples

View source: R/decorate_code.R

Description

Creates an object of the class with_flair

Usage

1

Arguments

text

A string, presumably representing R code.

...

Any number of default chunk options to override.

Value

A with_flair object.

See Also

flair

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# When run in console, this will print the results of mean(1:10)
my_code <- decorate_code(text = 'mean(1:10)') %>% flair_funs()

# The object itself, when printed, previews your code with flair

my_code


# Objects defined by decorate_code are created in the current environment for later use.

my_code <- decorate_code('foo <- mean(1:10)')

foo + 5

flair documentation built on April 24, 2020, 1:06 a.m.