[R] Plot

Tyler Rinker tyler_rinker at hotmail.com
Mon May 14 22:31:26 CEST 2012



That is likely because ferm is a factor.  A scatterplot is two numeric variables.  To make it a scatterplot wrap ferm with as.numeric. 
Cheers,
Tyler
----------------------------------------
Date: Mon, 14 May 2012 12:21:12 -0700
From: kellycool79 at yahoo.com
To: r-help at r-project.org
Subject: [R] Plot


Hello,

I am trying to make a plot of the rates of an enzyme against three different protein concentrations (there are 45 rates in total and split up into 3 groups of 15, each receiving one of the 3 protein concentrations). When I enter the following code I instead get 3 separate boxplots for each of the three different protein concentrations ...


plot(rate ~ ferm, data=LDH, col=LDH$rate, pch=c(17,18,19)[(as.numeric(LDH$rate)%%3)+1])


but I want a scatterplot showing 3 different lines indicating each of the protein concentrations. I'm not sure if I need to tweak my data set in order to get what I want?

I was also wondering how to include the origin (0,0) in the plots. I'm not sure if I'm missing something on the plot help page?

Any help would be appreciated. Thanks so much.
        [[alternative HTML version deleted]]


______________________________________________
R-help at 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.
 		 	   		  


More information about the R-help mailing list