[R] binary scatterplot
jfox at mcmaster.ca
Mon Feb 3 21:56:08 CET 2003
You could use plot(x, as.numeric(y) - 1).
At 01:10 PM 2/3/2003 -0700, Michael Lynn Fugate wrote:
>When I use the function plot() to plot a categorical variable with two
>levels versus a continuous variable, the two levels of the categorical
>variable are plotted at the values of 1.0 and 2.0. I would like them to
>be plotted at the values of 0.0 and 1.0. How can I do this?
>x <- 1:10
>y <- as.factor(rep(c("A","B"),c(5,5)))
Department of Sociology
email: jfox at mcmaster.ca
More information about the R-help