akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Sun Sep 11 21:17:29 CEST 2022

```Dear Tim,
I am using the result of cumsum(), which has leading zeroes, (like 0 0 1 1 2 2), coerce it to a character vector, collapse it, and then coerce it back to an integer to compare it in a switch statement. But now I got it. I can just use the collapsed character value...THanks anyways...

Yours sincerely,
AKSHAY M KULKARNI

________________________________
From: Ebert,Timothy Aaron <tebert using ufl.edu>
Sent: Monday, September 12, 2022 12:30 AM
To: akshay kulkarni <akshay_e4 using hotmail.com>; R help Mailing list <r-help using r-project.org>

Can you tell us why you want to do this? Is there something special about 09098 versus 9098 or 0000009098? In any mathematical operation these are all the same number.

Tim

From: akshay kulkarni <akshay_e4 using hotmail.com>
Sent: Sunday, September 11, 2022 2:58 PM
To: Ebert,Timothy Aaron <tebert using ufl.edu>; R help Mailing list <r-help using r-project.org>

[External Email]

Dear Tim,

So there is no way to coerce "09098" to 09098?

Yours sincerely,

AKSHAY M KULKARNI

________________________________

From: Ebert,Timothy Aaron <tebert using ufl.edu<mailto:tebert using ufl.edu>>
Sent: Monday, September 12, 2022 12:07 AM
To: akshay kulkarni <akshay_e4 using hotmail.com<mailto:akshay_e4 using hotmail.com>>; R help Mailing list <r-help using r-project.org<mailto:r-help using r-project.org>>

Keep as character.

Tim

-----Original Message-----
From: R-help <r-help-bounces using r-project.org<mailto:r-help-bounces using r-project.org>> On Behalf Of akshay kulkarni
Sent: Sunday, September 11, 2022 12:22 PM
To: R help Mailing list <r-help using r-project.org<mailto:r-help using r-project.org>>

[External Email]

Dear members,
I came across this queer thing during my analysis:
> as.integer("09098")

Any idea on how to retain the "0"?

Yours sincerely,
AKSHAY M KULKARNI

[[alternative HTML version deleted]]

______________________________________________
R-help using r-project.org<mailto:R-help using r-project.org> mailing list -- To UNSUBSCRIBE and more, see