ggbash_: Enter into a ggbash session.

Description Usage Arguments Details Value Examples

Description

ggbash_ executes a new ggbash session for faster ggplot2 plotting.

Usage

1
2
ggbash_(batch = "", clipboard = NULL, show_warn = TRUE,
  as_string = FALSE, show_compiled = TRUE)

Arguments

batch

A character. If given, ggbash_() will exit just after executing the given command.

clipboard

Default is NULL If batch is non-empty and clipboard is non-NULL, ggbash copies a resulted ggplot2 object to clipboard. just after executing the given command.

show_warn

Whether to show a warning message when ambiguously matched. Default is TRUE.

as_string

Return the resulted ggplot2 object as a string not as a ggplot2 object. Default is FALSE. Ignored when non-batch mode.

show_compiled

Print the built ggplot2 command. Default is TRUE.

Geom name:

the geom most frequently used (based on my experiences)

Column name:

the column with the smallest column index

Aesthetics:

required (x, y), non-missing (shape, size), default (alpha, stroke)

Details

ggbash provides concise aliases for ggplot2 functions. By calling ggbash(), your R session goes into a ggbash session, which only interprets predefined ggbash commands. Some basic commands like setwd() or pwd() works in ggbash session, but most of the usual R grammars are disabled. Instead, a variety of ggbash commands are enabled for writing ggplot2 script as faster as possible.

If you give a string as a first argument of 'ggbash', ggbash will exit just after executing the command. Useful for a one-liner.

Value

nothing

Examples

1
2
3
4
5
6
7
8
9
## Not run:  ggbash() # enter into an interactive ggbash session

# plot a ggplot2 figure
ggbash_("gg iris + point Petal.Width Petal.Length")

#' # plot a ggplot2 figure and copy the result
ggbash_("gg iris + point Petal.Width Petal.Length", 1)

## End(Not run)

caprice-j/ggbash documentation built on May 13, 2019, 12:11 p.m.