ggplot函数帮助页的示例代码,我基本上运行过一遍。。更新后有一个地方改动比较大:
”Scale functions for graphics“,全部整合到scales包里去了。
比如:
<br />
> x <- rnorm(10) * 100000<br />
> y <- seq(0, 1, length = 10)<br />
> p <- qplot(x, y)<br />
> p + scale_y_continuous(formatter = "percent")<br />
错误于continuous_scale(c("y", "ymin", "ymax", "yend", "yintercept", :<br />
参数((formatter = "percent")) 没有用<br />
> p + scale_y_continuous(formatter = "percent")<br />
错误于continuous_scale(c("y", "ymin", "ymax", "yend", "yintercept", :<br />
参数((formatter = "percent")) 没有用<br />
><br />
#<br />
################################<br />
library(scales)<br />
p + scale_y_continuous(labels = dollar_format())<br />
p + scale_y_continuous(labels = percent_format()) </p>
<p>#类似的都是这种问题<br />
然后去运行http://learnr.wordpress.com/ ; 以及 http://xccds1977.blogspot.com
两位大牛博客上的代码也基本是这种问题。
</p>