Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread Bert Gunter
?"%%" PLEASE read an Introduction to R (ships with R) or an online tutorial of your choice before posting further. You then will not have to waste nearly as much time (yours and ours) posting and waiting for answers! Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread David Winsemius
On Mar 27, 2014, at 7:48 AM, Prabhakar Ghorpade wrote: > Hi, > How do I find help on %% ?'%%' # Need to quote "specials" Also look at: ?'<-' ?'%in% ?'function' -- David. > > Regards, > Prabhakar > > > On Thu, Mar 27, 2014 at 4:56 PM, Jorge I Velez > wrote: > >> Hi there, >> >> Tr

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread Prabhakar Ghorpade
Hi, How do I find help on %% Regards, Prabhakar On Thu, Mar 27, 2014 at 4:56 PM, Jorge I Velez wrote: > 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:

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread Prabhakar Ghorpade
Pascal, Jorge, Berend, Pikal and Rui. Thanks all it helps. On Thu, Mar 27, 2014 at 8:18 PM, Prabhakar Ghorpade < dr.prabhaka...@gmail.com> wrote: > Hi, > How do I find help on %% > > Regards, > Prabhakar > > > On Thu, Mar 27, 2014 at 4:56 PM, Jorge I Velez > wrote: > >> Hi there, >> >> Try >> >

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread Rui Barradas
Hello, Inline. Em 27-03-2014 11:32, Pascal Oettli escreveu: Hello, Something like that? R> X <- 1:100 R> Y <- X %% 3 R> Y <- ifelse(Y==0, TRUE, FALSE) The ifelse here is not needed, you can simply do Y <- Y == 0 Rui Barradas R> X[Y] [1] 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread Pascal Oettli
Hello, Something like that? R> X <- 1:100 R> Y <- X %% 3 R> Y <- ifelse(Y==0, TRUE, FALSE) R> X[Y] [1] 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 [26] 78 81 84 87 90 93 96 99 HTH, Pascal On Thu, Mar 27, 2014 at 6:23 PM, Prabhakar Ghorpade wrote: > Hi, > here's

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread PIKAL Petr
t; To: r-help@r-project.org > Subject: [R] Selecting numbers not divisible by 3 > > 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/

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread Jorge I Velez
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 -

Re: [R] Selecting numbers not divisible by 3

2014-03-27 Thread Berend Hasselman
On 27-03-2014, at 10:23, Prabhakar Ghorpade 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 intg

[R] Selecting numbers not divisible by 3

2014-03-27 Thread Prabhakar Ghorpade
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 d

[R] Selecting numbers not divisible by 3

2014-03-27 Thread Prabhakar Ghorpade
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 d