Re: [R] plotting every ith data point?

From: jebyrnes <jebyrnes_at_ucdavis.edu>
Date: Thu, 21 Feb 2008 14:04:35 -0800 (PST)

Here's a similar variant on what has been proposed, but is simpler. It relies on the fact that plot() doesn't need a ~.

a<-1:100
b<-seq(1,length(a),5)
plot(1:20, a[1:b])

Alternately, if you were using a data frame, as long as you knew the column names, you could do something like

plot(my.data$x[b], my.data$y[b])

Simple, no?

-- 
View this message in context: http://www.nabble.com/plotting-every-ith-data-point--tp15601953p15620348.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Thu 21 Feb 2008 - 22:08:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 21 Feb 2008 - 23:30:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive