Ggplot2: "Unknown parameters: probs" for fun.y = quantile in geom_line ()

The following code to draw a decimal quantile string generates an "Unknown Parameters: Problems" error. Does anyone 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 updated the latest version of ggplot and used the following version of R:

R.Version ()

$ platform
[1] "x86_64-w64-mingw32"

$ arch
[1] "x86_64"

$ os
[1] "mingw32"

$ System
[1] "x86_64, mingw32"

$ status
[1] "

$ basic
[13 "

$ 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] "Complete Ingredients"

+5
source share
1 answer

It took me a while to break through ggplot2 2.0-helpfiles. For this occasion, they are here . The new version has the argument fun.args . So, I was able to run this code with the updated version of ggplot and create the desired graph:

 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)) 
+19
source

Source: https://habr.com/ru/post/1239735/


All Articles