The following code for drawing a line of the 10% quantile produces an error "Unknown parameters: probs". Does anybody know why?
ggplot(aes(y = mpg, x = cyl), data = mtcars) +
geom_point(color = "orange") +
geom_line(stat = 'summary', fun.y = quantile, probs = 0.1)
I have updated to the newest version of ggplot and use the following R version:
R.Version()
$platform
[1] "x86_64-w64-mingw32"$arch
[1] "x86_64"$os
[1] "mingw32"$system
[1] "x86_64, mingw32"$status
[1] ""$major
[1] "3"$minor
[1] "2.0"$year
[1] "2015"$month
[1] "04"$day
[1] "16"$
svn rev
[1] "68180"$language
[1] "R"$version.string
[1] "R version 3.2.0 (2015-04-16)"$nickname
[1] "Full of Ingredients"
It took me some digging through the ggplot2 2.0-helpfiles. For this case, they are here. In the new version there is an argument fun.args
. So, I was able to run this code with an updated version of ggplot and produce the desired plot:
ggplot(aes(y = mpg, x = cyl), data = mtcars) +
geom_point(color = "orange") +
geom_line(stat = 'summary', fun.y = "quantile", fun.args=list(probs=0.1))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With