I have a text document containing three columns. One column is "sex", and each value is either "M" or "F". The other two columns contain numerical data (my explanatory variable and response variable).
I want to create a Scatterplot in R where the point will look different for males than for females. I don't know how to do this.
dputon so that people attempting an answer can make the same data. Inplot, thecolargument gives different colors, thepchargument can get different symbols (including letters). – Glen_b Mar 01 '15 at 01:04plot(Sepal.Length~Sepal.Width,iris,col=Species,pch=as.numeric(Species))and heres one with color and lettersplot(Sepal.Length~Sepal.Width,iris,col=Species,pch=as.character(Species))(but it's not so successful, since two species start with 'v') – Glen_b Mar 01 '15 at 01:13