Re: [R] subset-analogue removing fed in indexes?

From: Johannes Graumann <graumann_at_caltech.edu>
Date: Wed 01 Jun 2005 - 08:08:19 EST

Jebus, you guys are fast!

Thanks so much,

Joh

On Tue, 2005-05-31 at 17:38 -0400, Gabor Grothendieck wrote:
> On 5/31/05, Johannes Graumann <graumann@caltech.edu> wrote:
> > Hello,
> >
> > Here's my issue:
> >
> > I want to plot the following vectors:
> > > x <- c(0.0, 2.0, 15.0, 100.0, 105.0, 105.1, 110.0, 120.0, 120.1,
> > 130.0)
> > > data <- c(8.75, 8.75, 16.25, 38.75, 61.25, 8.75, NA, 8.75, NA, NA)
> >
> > and avoid the line discontinuations caused by 'NA'.
> > > plot_data <- na.omit(data)
> > will clean up 'data' for me, but now I need to get a 'plot_x' which
> > omits the values indexed with what's spit out by 'na.exclude(data)'.
> >
> > Can anybody let me know a smooth way of how to delete entries with
> > certain indexes from a vector?
>
> plot(approx(x,data))
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 01 08:14:02 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:17 EST