## Copy and paste this into R. x1<-rbinom(dim(cars)[1],2,.5) plot(cars,main="lowess(modified cars)",col=x1+1) for(i in unique(x1)) lines(lowess(cars[x1==i,]),col=i+1)
This might help... Matthew McIntosh -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dean Sonneborn Sent: Wednesday, January 04, 2006 10:54 AM To: [email protected] Subject: [R] multiple lowess line in one plot I'm using this code to plot a smoothed line. These two columns of data really represent 4 groups and I'd like to plot a separate line for each group but have them all in the same plot. The R-Docs for lowess do not seem to indicate some type of "GROUPS=var_name" option. What would be the syntax for this? plot(AWGT ~ lipid ) lines(lowess(lipid , AWGT, f=.8)) -- Dean Sonneborn, MS Programmer Analyst Department of Public Health Sciences University of California, Davis (530) 754-9516 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
