Releases: caprice-j/ggbash
Releases · caprice-j/ggbash
v0.4.5
Bug fixes
- handle two types of
+
signs in terminal mode- Here I had to make a design choice. Now terminal-mdoe ggbash CANNOT
contain whitespaces between aes names and values
(i.e. Bad :size = 3 + .5
and Good:size=3+.5
)
This is because without parentheses and commas, there are almost
no clues that differentiate between "ggplot2 plus" (connecting
layers) and "R's plus" (an operator for addition).
The hope is that in NSE mode ggbash can still include whitespaces
between aes names and values. I hope this would not lead to users'
frustration.
- Here I had to make a design choice. Now terminal-mdoe ggbash CANNOT
- handle redundant aes() specification (simply remove it)
v0.4.4
Bug fixes
- handle grouped_df case NSE in ggbash()
- add partial match preference when exact match
(p
should returnp
instead ofprice
,
even if the latter comes first) - fix
%>%
and aes() case - layer-specific data specification
- add
.
(dot) in parsing rules of variable names
Version 0.4.3: %>% operator
Enhancements
- handling of magritrr
%>%
operator- turned out to be harder than expected.
ggplot2-compiler cannot recognize what.
operator means,
so the contents of.
have to be properly set in temporary
variable (ggbash_piped
) in ggbash() and exec_ggbash().
- turned out to be harder than expected.
v0.4.2
NSE
Additional Features
- Non-standard evaluation (NSE) interface
- handling of x=1 (scalar variable)
- handling of R functions (turned out to be complicated)
Bug Fixes
- remove
:
in theme elements names and/
in save_ggplot arguments. This is because or R's language restriction for more handy NSE. This supersede grammar rules determined in v0.2 change.
Approx String Match & Interface to Other ggplot2 Extensions
Major Updates
Approximate String Matching
- Approximate String Matching reduces programmer's stress because
we usually type tokens only by its consonants.- aesthetics (
size
bysz
) - theme configuration (
legend.key
byl.key
, orlegend.box.background
byl.b.b
)
- aesthetics (
Interface to other ggplot2 extensions
- The main scope of ggbash is to make a compiler for default ggplot2 functions.
Handling ggplot2 extension libraries withinggbash()
arguments
should increase complexity
and might significantly slows down the development process.
As a remedy,ggbash()
now returns a ggplot2 object (not a string) byggbash()
,
and can chain other geom_ or theme_ objects by the normal+
operator in ggplot2.- Ex.
ggbash("gg(iris, Sepal.W, Sepal.L) + point(col=Spec, size=5) ") + geom_text_repel(aes(label=Species))
- Ex.
Bug Fixes
- add docs tests of various geoms
v0.3.3
ggbash 0.3.2
Bug Fixes
- get stats (
method="lm"
in geom_smooth,binwidth=30
in geom_histogram)
byget_stat_params
- get special flags like
weight
in geom_bar - start docs test of
geom_abline
andgeom_bar
- show colnames of previously-used data frame
- fix parentheses mismatch
- one problem is unnecessary parentheses (
legend.position = ("none")
or
panel.ontop = (TRUE)
)... - This is deceptively simple but hard to solve because of
the current parsing production rules. - some rules can't know if
element_text
is
placed before the current token.
- one problem is unnecessary parentheses (
v0.3.1
ggbash 0.3.0: Implement fixit
Major Updates
Fixit
- From this v0.3.0, ggbash incorporates a powerful feature called fixit.
It's inspired from a modern C++ compiler
clang's Fix-It Hints.
Now when ggbash users input a string which contains some typos,
ggbash gives users useful information on
what might be needed to fix the compile error.- For example, if users wrongly input
the column name likegg iris + point Sepl.W Sepal.L
,
ggbash givesColumn name not found
error
and also displays that the most similar column names are
Sepal.Width, Species, Sepal.Length, Petal.Width, Petal.Length
,
in this order.
This could significantly reduce the learning cost of ggplot2 and ggbash,
having a possibility of making ggbash suitable for new ggplot2 users
as well as its heavy users.
- For example, if users wrongly input
Other Bug Fixes
- checked coding style according to jimhester/lintr package.
- renamed partial_match_utils.R to prefix_match.R (more accurate)