Learn R Programming

yamlet (version 0.4.8)

ggready.data.frame: Prepare Data Frame for GGplot

Description

Prepares data.frame for ggplot. Calls resolve and appends units to label using append_units (passing style = 'plotmath' if parse is true, else style = 'plain'). Enforces class 'decorated'.

Usage

# S3 method for data.frame
ggready(x, parse = getOption("ggready_parse", TRUE), ...)

Arguments

x

object

parse

passed to append_units

...

passed to append_units

Value

decorated

See Also

Other resolve: ggready(), resolve.data.frame(), resolve()

Other interface: as_classified.factor(), conditionalize.data.frame(), decorate.character(), decorate.data.frame(), ggplot.decorated(), io_csv.character(), io_csv.data.frame(), io_table.character(), io_table.data.frame(), io_yamlet.character(), io_yamlet.data.frame(), is_parseable.default(), read_yamlet(), resolve.data.frame(), write_yamlet()

Examples

Run this code
# NOT RUN {
file <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
x <- decorate(file)
x <- ggready(x)
str(x$conc)
library(magrittr)
library(ggplot2)
file %>%
 decorate %>%
 filter(!is.na(conc)) %>%
 ggready %>%
 ggplot(aes(x = time, y = conc, color = Heart)) +
 geom_point()
# }

Run the code above in your browser using DataLab