Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-29 Thread R. Michael Weylandt
It would behoove you to read some introductory materials -- use help.start() to get be provided with the standard "An Introduction to R." More generally, the help system can be accessed by typing help("name") or, as a shortcut, ?name. In your case, help("&") would lead to the correct answer. The

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-29 Thread Rantony
Hi Michel, In this function, I want to apply “OR” operator instead of “&” Condition. dat[dat$AGE<=40 & da$AGE>=30,"TRUE/FALSE"]<-TRUE How it is possible ? - Thanks Antony From: Michael Weylandt [via R] [mailto:ml-node+s789695n4631610...@n4.nabbl

Re: [R] Hash Table - Select and Change Data iniside Matrix Using "Between"

2012-05-28 Thread arun
Hi,  I guess this is what you are looking for, dat[dat$AGE<=40 & da$AGE>=30,"TRUE/FALSE"]<-TRUE A.K. - Original Message - From: Rantony To: r-help@r-project.org Cc: Sent: Monday, May 28, 2012 10:01 AM Subject: [R] Hash Table - Select and Change Data inisid

Re: [R] Hash Table - Select and Change Data iniside Matrix Using "Between"

2012-05-28 Thread R. Michael Weylandt
I already answered this. Don't double post questions. On Mon, May 28, 2012 at 10:01 AM, Rantony wrote: > Hi, > > Here i have been an matrix like this, > > *NAME    AGE   PALCE                TRUE/FALSE* > ABC         20      INDIA > XYZ         30       FRANCE > PQR        40       USA > MNO    

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-28 Thread R. Michael Weylandt
Greater than or equal to is simply >= like most languages. For more complicated questions, simply combine booleans: E.g., between 5 and 25 with(dat, (AGE < 25) & (AGE > 5)) and so on. Michael On Mon, May 28, 2012 at 9:34 AM, Rantony wrote: > Hi Michel, > > > > More than equal to function, ho

[R] Hash Table - Select and Change Data iniside Matrix Using "Between"

2012-05-28 Thread Rantony
Hi, Here i have been an matrix like this, *NAMEAGE PALCETRUE/FALSE* ABC 20 INDIA XYZ 30 FRANCE PQR40 USA MNO 30KENIYA DEF25AUSTRALIA GTY34 CANADA BNH 38JAPAN Here, *TRUE/F

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-28 Thread Rantony
Hi Michel, More than equal to function, how can I use other function ?, For example :- Age between Age Greater Than or Equal to like that …. How ? From: Michael Weylandt [via R] [mailto:ml-node+s789695n4631319...@n4.nabble.com] Sent: Friday, May 25, 2012 7:48 PM To: Akkara

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread Bert Gunter
FALSE > 4  MNO  30 KENYA   TRUE > 5  DEF  25 AUSTRALIA  FALSE > > > A.K. > > > > > > > ----- Original Message ----- > From: Jeff Newmiller > To: Rantony ; r-help@r-project.org > Cc: > Sen

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread arun
- Original Message - From: Jeff Newmiller To: Rantony ; r-help@r-project.org Cc: Sent: Friday, May 25, 2012 10:25 AM Subject: Re: [R] Hash Table - Select and Change Data iniside Matrix Read help for the ifelse function. Type

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread Rantony
Thank you Michael. You are awesome…. It works, what I mean. Thank you very much. - Antony. From: Michael Weylandt [via R] [mailto:ml-node+s789695n4631319...@n4.nabble.com] Sent: Friday, May 25, 2012 7:48 PM To: Akkara, Antony (GE Energy, Non-GE) Subject: Re: Hash Table - Sel

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread Jeff Newmiller
Read help for the ifelse function. Type ?ifelse at the command line. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread R. Michael Weylandt
There aren't "empty" values in R. nor is it likely you have a matrix of this form, but perhaps a data frame. Perhaps this works for you, If "dat" is the name of your data.frame, dat[dat$AGE == 30,"TRUE/FALSE"] <- TRUE Next time do use dput() to give a reproducible example of your data -- if

[R] Hash Table - Select and Change Data iniside Matrix

2012-05-25 Thread Rantony
Hi, Here i have been a matrix like this, *NAMEAGE PALCETRUE/FALSE* ABC 20 INDIA XYZ 30 FRANCE PQR40 USA MNO 30KENIYA DEF25AUSTRALIA Here,* TRUE/FALSE* Column containing empty values. So my requir