-
Notifications
You must be signed in to change notification settings - Fork 28
/
NEWS.Rmd
120 lines (84 loc) · 3.36 KB
/
NEWS.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
---
title: "NEWS"
output:
github_document:
toc: true
toc_depth: 3
---
```{r setup, include=FALSE}
library(ggedit)
knitr::opts_chunk$set(echo = TRUE)
r <- getOption("repos")
r["CRAN"] <- "http://cran.cnr.berkeley.edu/"
options(repos = r)
```
# 0.4.0
## Update
Bump R version to align with native pipe
# 0.4.0
## Update
Refactor functions to align with `ggplot2` version (3.5.0).
- Replace plyr with purrr dependency
- Update faceting cloning to support new formals in `ggplot2`
# 0.2.6
## Update
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)`
## Add
**margins** can be edited in the theme UI
`+.gg` functionality added to *gglist* class to manipulate to multiple plots in layout
```{r,eval=FALSE}
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`.
```{r,eval=FALSE}
gg_session()
```
**gg_vetting** returns the columns from gg_session relevant to a compiled plot
```{r,eval=FALSE}
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`).
```{r,eval=FALSE}
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](https://ggplot2-exts.org/))
**dput.ggedit** returns dput for ggplot2 object in script form and not a structure.
```{r,eval=FALSE}
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.
```{r,eval=FALSE}
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)
```
# 0.2.2
## Update
- Change `mutate_each` with `mutate_all` to be compatible with new `dplyr` release
## Add
- 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)