如何模仿ggplot2的plus运算符?

时间:2018-01-14 04:42:29

标签: r ggplot2

我正在编写一个包,用于在 Age count 0 <25 8 1 25-29 8 2 30-35 8 3 >35 8 样式

之后构建D3plus图

到目前为止这样的事情很有效:

ggplot2

这纯粹是糖语法,但我真的想模仿d3plus() %>% d3p_type("treemap") %>% d3p_data(dta) %>% d3p_groupby(c("parent","id")) 加上运算符,所以我试图将一个S3类附加到名为“d3p”的函数中,并且我决定模仿{{1}的一部分包含ggplot2而不是magrittr

的包
+

这不起作用,我想知道如何为某些类使用加号。这样做的目的是遵循%>%作为标准。

0 个答案:

没有答案
相关问题