Hi there, Try
X[X %% 3 == 0] HTH, Jorge.- On Thu, Mar 27, 2014 at 6:46 PM, Prabhakar Ghorpade < dr.prabhaka...@gmail.com> wrote: > Hi, > here's my code > > X <- 1:100 > > I want to select number divisible by 3 out of them how can I select it? > > ( I tried following > X <- 1:100 > DIV <- Y - > X/3 > > But I am getting whole number and number with fractions. WHole intgers are > my number of interest from original X. How can I traceback to number > divisbile by 3. ?) > > Thanks > > Kind Regards, > Prabhakar > > > > -- > Dr.Ghorpade Prabhakar B. > Ph.D. Scholar ( Animal Biochemistry) > Indian Veterinary Research Institute. > India > > [[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. > [[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.