d identifier but`2` is!
> >
> > Yours sincerely,
> > AKSHAY M KULKARNI
> >
> >
> > From: Bert Gunter
> > Sent: Thursday, September 8, 2022 12:39 AM
> > To: akshay kulkarni
> > Cc: R help Mailing list
>
again...I got to know that
> 2 is not a valid identifier but`2` is!
>
> Yours sincerely,
> AKSHAY M KULKARNI
>
>
> From: Bert Gunter
> Sent: Thursday, September 8, 2022 12:39 AM
> To: akshay kulkarni
> Cc: R help Mailing list
> Subject:
I got to know that 2 is not a
valid identifier but`2` is!
Yours sincerely,
AKSHAY M KULKARNI
From: Bert Gunter
Sent: Thursday, September 8, 2022 12:39 AM
To: akshay kulkarni
Cc: R help Mailing list
Subject: Re: [R] inconsistency in switch statements.
Well,
Well, as it states on the Help page, which should always be the first
place to look for, ummm, help:
"If the value of EXPR is not a character string it is coerced to
integer. Note that this also happens for factors, with a warning, as
typically the character level is meant. If the integer is betwe
Dear Andrew,
Its working. Thanks a lot
Yours sincerely,
AKSHAY M KULKARNI
From: Andrew Simmons
Sent: Thursday, September 8, 2022 12:08 AM
To: akshay kulkarni
Cc: R help Mailing list
Subject: Re: [R] inconsistency in switch
1 and 2 are not valid identifiers in R, so you need to surround them with
backticks to make them valid, the same as quoting a string:
switch(Stst, `1` = print("NO"), `2` = print("YES"))
On Wed., Sep. 7, 2022, 14:35 akshay kulkarni, wrote:
> Dear members,
> The foll
6 matches
Mail list logo