[datatable-help] R - Comparison
Ash111
hamza_essid at hotmail.fr
Wed Nov 4 11:01:35 CET 2015
Hello everyone,
I have a vector X = [ 0 2 5 4 1 9 ]
I want to build another vector Y wich will have the same length as X and
which contains the comparison of the elements of x as follows :
if x < = 3: returns F
if 3 < x < = 6: returns M
if 6 < x: returns E
I expected the result:
Y = [F F M M F E ]
How to do that with R ??
Thank you :-)
--
View this message in context: http://r.789695.n4.nabble.com/R-Comparison-tp4714329.html
Sent from the datatable-help mailing list archive at Nabble.com.
More information about the datatable-help
mailing list