New Package ggbash: A Simpler ggplot2 Syntax

64 views
Skip to first unread message

Yas

unread,
Jan 16, 2017, 3:04:39 PM1/16/17
to ggplot2
Spending the past three-weeks, I've built a package called ggbash.

ggbash is a different and faster interface to write ggplot2 objects.
Essentially it is a higher-level language on top of ggplot2 and R.

Its main function, ggbash(), takes a ggbash "source code" and returns an "executable" ggplot2 object like:

ggbash("gg iris + point Sepal.W Sepal.L size = 5")

# output a figure of ggplot(iris) + geom_point(aes(Sepal.Width, Sepal.Length), size=5)


ggbash() function also works as an interface for non-standard evaluation (NSE):

ggbash(gg(iris) + point(Sepal.W, Sepal.L, size=5))

# plots the same ggplot2 figure


ggbash is still in its infancy. I've confirmed the current ggbash version 0.4.2 can correctly "compile" more than 60% of the geom_* examples in ggplot2 document. Currently ggbash interprets only "geom_*" and "theme*". My goal of this year is to expand the ggplot2 docs coverage and make it more reliable.

For more information:

I hope this will help ggplot2 users do more comfortable plotting.

Sincerely yours,

Yasutaka Tanaka
README-func.png
170116-ggbash.png
Reply all
Reply to author
Forward
0 new messages