genPlotTitleCmd: Generate a string to add a title to a plot

View source: R/rattle.R

genPlotTitleCmdR Documentation

Generate a string to add a title to a plot

Description

Generate a string that is intended to be eval'd that will add a title and sub-title to a plot. The string is a call to title, supplying the given arguments, pasted together, as the main title, and generating a sub-title that begins with ‘Rattle’ and continues with the current date and time, and finishes with the current user's username. This is used internally in Rattle to adorn a plot with relevant information, but may be useful outside of Rattle.

Usage

genPlotTitleCmd(..., vector=FALSE)

Arguments

...

one or more strings that will be pasted together to form the main title.

vector

whether to return a vector as the result.

Author(s)

Graham.Williams@togaware.com

References

Package home page: https://rattle.togaware.com

See Also

eval, title, plotRisk.

Examples

# generate some random plot
plot(rnorm(100))

# generate the string representing the command to add titles
tl <- genPlotTitleCmd("Sample Plot of", "No Particular Importance")

# cause the string to be executed as an R command
eval(parse(text=tl))

rattle documentation built on March 21, 2022, 5:06 p.m.