Learn R Programming

yamlet (version 0.4.8)

ggplot.decorated: Create a New ggplot for a Decorated Data Frame

Description

Creates a new ggplot object for a decorated data.frame. This is the ggplot() method for class 'decorated'; it tries to implement automatic labels and units in axes and legends in association with print.dg. Use ggplot(as.data.frame(x)) to get default ggplot() behavior. Use ggplot(as_decorated(x)) to enforce custom behavior.

Usage

# S3 method for decorated
ggplot(data, ...)

Arguments

data

data.frame or similar

...

passed to ggplot

Value

return value like ggplot

See Also

Other dg: print.dg()

Other interface: as_classified.factor(), conditionalize.data.frame(), decorate.character(), decorate.data.frame(), ggready.data.frame(), 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 {
meta <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
x <- decorate(meta)
library(ggplot2)
class(ggplot(data = x) + geom_path(aes(x = time, y = conc)))
class(ggplot(data = x, aes(x = time, y = conc)) + geom_path())
example(print.dg)
# }

Run the code above in your browser using DataLab