-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathmake_ggplot2_functions.R
More file actions
executable file
·46 lines (43 loc) · 943 Bytes
/
make_ggplot2_functions.R
File metadata and controls
executable file
·46 lines (43 loc) · 943 Bytes
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
# create bindings.py from R directly
# Rscript bin/make_ggplot2_functions.R >> pygg/pygg.py
# edit pygg/pygg.py and remove old bindings
library(ggplot2)
exclude = c(
"%+%",
"%+replace%",
"aes_q",
"benchplot",
"fortify",
"ggstructure",
"gg_dep",
"ggplot",
"ggplot_build",
"ggplot_gtable",
"ggplotGrob",
"is.coord",
"is.Coord",
"is.ggproto",
"is.facet",
"is.ggplot",
"is.theme",
"last_plot",
"map_data",
"mean_cl_boot",
"mean_cl_normal",
"mean_sdl",
"mean_se",
"median_hilow",
"should_stop",
"waiver",
# special handling in pygg itself
"facet_wrap",
"facet_grid",
"ggsave"
)
# generate pygg commands file
cat("# generated by make_ggplot2_binding\n")
cat(sprintf("# ggplot2 library version: %s\n", packageVersion("ggplot2")))
cat(sprintf("# date: %s\n", date()))
for ( x in setdiff(lsf.str("package:ggplot2"), exclude) ) {
cat(sprintf('%s = make_ggplot2_binding("%s")\n', x, x))
}