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
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
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
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
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
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
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
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
- 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
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
Read help for the ifelse function. Type ?ifelse at the command line.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#. ##.#. Live Go...
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
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
13 matches
Mail list logo