I am trying to make a scatterplot with containing three columns. I know how to plot the two columns but now the third column consists of M or F (male or female) and I don't know how to separate the data so I can make two separate regression lines on the same graph.
meta #name of file plot(meta$mass, meta$rate, xlab="mass", ylab="rate") I can make the regression line with all the data but I just don't know how to split everything up. abline(lm(rate ~ mass, data=meta), col="red") Thanks, Marsha ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.