[R] Question about using ggplot
overholic10 at ajou.ac.kr
overholic10 at ajou.ac.kr
Sun Nov 13 16:18:24 CET 2016
Hi. I’m a student from South Korea, and I’m studying R by myself.
While I am studying, I have a trouble dealing with ggplot(especially, about parameter ‘family’)
> b <- biopsy
> b$classn[b$class == "benign"] <- 0
> b$classn[b$class == "malignant"] <- 1
> ggplot(b, aes(x = V1, y = classn)) + geom_point(position = position_jitter(width = 0.3, height = 0.06), alpha = 0.4, shape = 21, size = 1.5) + stat_smooth(method = "glm", family = “bimomial")) #first code
Warning: Ignoring unknown parameters: family
While studying, I am wondering why there is a warning message. And also, there comes a wrong logistic model(Above picture). But in fact, I expect the below picture from the above code.
And the below code yields ‘the model’ that I expected(below picture)
ggplot(b, aes(x = V1, y = classn)) + geom_point(position = position_jitter(width = 0.3, height = 0.06), alpha = 0.4, shape = 21, size = 1.5) + stat_smooth(method = "glm", method.args = list(family = "binomial"))
What’s wrong with the first code? When I searched about that from online, other people don’t seem to have a problem using family parameters.
(I currently updated ggplot2, MASS, and sjPlot (Also, double checked it)
Plus, I used code w/ or w/o using “”)
I hope getting a good response from you.
Thanks for reading my mail, and if my message has a rude expression, I’m sorry for my bad english skills..:(
More information about the R-help
mailing list