[R] removal of an element from a vector
vitorchagas at yahoo.com
Wed Jan 4 23:38:50 CET 2006
You could simply do the following
y <- x[<100]
z <- x[x>=100]
That's one of the wonderful things about R.
--- gynmeerut <gynmeerut at indiatimes.com> wrote:
> Dear All,
> I have some problem in R which I'm explaining
> using an example:
> i want to remove the elements which are lesser than
> 100 and as a result i want two vectors
> y<-(containing elements <100)
> z<-(remaining elements)
> Moreover if I wish to use two different programs for
> vectors y and z.
> which command shall I use(will IF-ELSE work ?)
> Thanks and regards,
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help