Thanks a lot! This works. Now I want to do the opposite let's say that I have one sequence for example check in image http://imageshack.us/photo/my-images/4/unleduso.png/ column A (this is a seq(1,113,4) and I want when I get the number 9 to say that this is the third number in the seq (1,113,4). everything about the seq(1,113,4) is known and I want when I get one of the number of the sequence to say which is its order. How I can do that? B.R A;ex
________________________________ From: William Dunlap <wdun...@tibco.com> Sent: Friday, September 30, 2011 6:34 PM Subject: RE: [R] is member is.element(myvector, seq(1,800,4)) or, if you like typing percent signs, myvector %in% seq(1,800,4) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Alaios > Sent: Friday, September 30, 2011 9:26 AM > To: R-help@r-project.org > Subject: [R] is member > > Dear all, > I have a vector with number that some of them are part of the > > seq(1,800,4). How can I check which of the numbers belong to the seq(1,800,4) > > LEt's say that is called myvector the vector with the numbers. > Is there in R something like this? > is.member(myvector,seq(1,800,4)) > > I would like to thank you in advance for your help > > B.R > Alex > [[alternative HTML version deleted]] [[alternative HTML version deleted]]
______________________________________________ R-help@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.