[R] Double AND within an IF statement
Bert Gunter
bgunter.4567 at gmail.com
Wed Feb 24 17:18:03 CET 2016
Almost surely no.
You are confusing "&&" with "&"
?"&"
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Feb 24, 2016 at 8:10 AM, Robert Sherry <rsherry8 at comcast.net> wrote:
> This should work:
> if ( age > 4 && age < 8 && infection > 0 ) replacement = 2
>
> Bob
>
> On 2/24/2016 7:08 AM, Polychronis KOSTOULAS wrote:
>>
>>
>> Hi there,
>>
>> apologies if this is easy. I want to write this condition:
>>
>> If age is more than 4 years and less or equal to 8 years and infection is
>> positive then replacement is 2.
>>
>> Can you help me the double END?
>>
>> Thanks,
>> Polychronis
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> 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.
>>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
More information about the R-help
mailing list