anging a condition is pretty simple
>
> David C
>
> From: Jeff Johnson [mailto:mrjeffto...@gmail.com]
> Sent: Tuesday, February 18, 2014 12:54 PM
> To: dcarl...@tamu.edu
> Cc: R help
> Subject: Re: [R] Updating a data frame based on if condition
>
> Ahh, I was
E FALSE FALSE TRUE TRUE FALSE TRUE FALSE FALSE
TRUE TRUE
[49] TRUE TRUE
And adding or changing a condition is pretty simple
David C
From: Jeff Johnson [mailto:mrjeffto...@gmail.com]
Sent: Tuesday, February 18, 2014 12:54 PM
To: dcarl...@tamu.edu
Cc: R help
Subject: Re: [R] Updating a d
Hi,
I don't know whether the 'mydata" object was updated or not before you run the
table.
mydata <- within(mydata,FNAME_SUSPECT <- FNAME_TOKEN_COUNT
>10|FNAME_LENGTH>45|regexpr("9",FNAME_PATTERN)==0)
table(mydata$FNAME_SUSPECT)
#
#FALSE
# 50
Now, your second condition (reply to Davi
R Cookbook.
>
>
> On Tue, Feb 18, 2014 at 10:16 AM, David Carlson wrote:
>
>> Not always true, but it is in this case:
>>
>> ?ifelse
>>
>> David C
>>
>> -Original Message-
>> From: r-help-boun...@r-project.org
>> [mailto:r-he
.@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Jeff Johnson
> Sent: Tuesday, February 18, 2014 11:24 AM
> To: R help
> Subject: [R] Updating a data frame based on if condition
>
> I have a subset of data that I have identified as "suspect" (f
Not always true, but it is in this case:
?ifelse
David C
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of Jeff Johnson
Sent: Tuesday, February 18, 2014 11:24 AM
To: R help
Subject: [R] Updating a data frame based on if condition
I
I have a subset of data that I have identified as "suspect" (for example,
the first name has excessive spaces, is longer than 35 characters or has a
number).
What I want to do is update the FNAME_SUSPECT field in "mydata" to TRUE if
any of those conditions are met.
Here's my data:
> dput(mydata)
7 matches
Mail list logo