Refactor functions to align with ggplot2
version (3.5.0).
- Replace plyr with purrr dependency
- Update faceting cloning to support new formals in
ggplot2
Collapse internal files to run the module and gadget from same base script.
Reorganize BS Modals to have columns by object type.
Change plot.ggedit be a print.ggedit method.
shinyBS
js library dependencies loaded with package, this lets ggedit
run on attachment. i.e. ggedit::ggedit(p)
margins can be edited in the theme UI
+.gg
functionality added to gglist class to manipulate to multiple
plots in layout
as.gglist(list(pList[[1]],pList[[3]])) +
geom_hline(yintercept=3:4,linetype=2) +
theme_minimal()+
theme(legend.position = 'top')
gg_session retreives all functions that create ggroto layers or
stats in current loaded namespace and returns unique mapping to their
position
,geom
,stat
.
gg_session()
gg_vetting returns the columns from gg_session relevant to a compiled plot
gg_vetting(pList$pointSmooth)
ggedit_opts functionality to control session levels options (like
knitr::opts_chunk
). This can be used to manipulate the package
defaults like the theme tips seen in BS modals. It is also used to store
an updated output of gg_session, so ggedit can identify the correct
mapping with gg_extension pacakges (eg ggalt
).
library(ggalt)
ggedit_opts$set(list(session_geoms=gg_session()))
ggedit_opts$get('session_geoms')
manipulate gg_extension pacakges (still in development, but works for a lot of the ggplot2 extension packages)
dput.ggedit returns dput for ggplot2 object in script form and not a structure.
pList$pointSmooth #original compiled plot
this.gg <- dput.ggedit(pList$pointSmooth) #dput the plot
writeLines(this.gg) #show the output
eval(parse(text=this.gg)) #recompile the plot
summary.ggedit method for ggedit class return script that created compiled gg object.
out <- ggedit(pList[1:2])
#assuming out is returned from ggedit
summary(out)
# point
# ggplot(mapping=aes(x=Sepal.Length,y=Sepal.Width),[data.frame])+
# geom_point(aes(colour=Species),size=6)
#
# pointWrap
# ggplot(mapping=aes(x=Sepal.Length,y=Sepal.Width),[data.frame])+
# geom_point(aes(colour=Species),size=6)+
# facet_wrap(facets=~Species,shrink=TRUE)
- Change
mutate_each
withmutate_all
to be compatible with newdplyr
release
- can pass functions into stat_summary, eg `stat_summary(fun.y=mean_sd, geom='point')`
- data.frames in layers are embedded as structures in verbose outputs, e.g. `geom_point(data=mtcars, aes(cyl, mpg))` will return
```r
[1] "geom_point(mapping=aes(x=cyl,y=mpg), data=structure(list(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3,
24.4, 22.8, 19.2, 17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 32.4,.. <truncated>
```
- aesthetic can be set to NULL, ie aes(group=NULL)