comparision and removal

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

comparision and removal

gynmeerut


Dear All,


I am using R and I am putting my problem in form of an example:

X<-c(128,34,153,987,345,45,3454,23,123)
I want to remove the entries which are lesser than 100(? How to compare every element with 100 and how to create subsets )
and I need two vectors y and z s.t
y<-c(entries < 100)
z<- c(remaining entries)

Moreover, Please tell me which command to use if I want to use different programs for y and z.
X is the whole dataset and y,z are its disjoint subsets.

Thanks
GS

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: comparision and removal

Uwe Ligges
gynmeerut wrote:

>
> Dear All,
>
>
> I am using R and I am putting my problem in form of an example:
>
> X<-c(128,34,153,987,345,45,3454,23,123)
> I want to remove the entries which are lesser than 100(? How to compare every element with 100 and how to create subsets )
> and I need two vectors y and z s.t
> y<-c(entries < 100)
> z<- c(remaining entries)
>
> Moreover, Please tell me which command to use if I want to use different programs for y and z.
> X is the whole dataset and y,z are its disjoint subsets.


Arbitrary basic documentation on R programming (e.g. the manual "An
Introduction to R") explains how to compare and how to use index
operations. Please don't ask on R-help for your homework questions, but
please read the posting guide.

Uwe Ligges



> Thanks
> GS
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html