Re: [R] inadequacy in as.integer....

2022-09-11 Thread akshay kulkarni
M To: R help Mailing list mailto:r-help@r-project.org>> Subject: [R] inadequacy in as.integer [External Email] Dear members, I came across this queer thing during my analysis: > as.integer("09098") Any idea on how to retain the "0"?

Re: [R] inadequacy in as.integer....

2022-09-11 Thread Ebert,Timothy Aaron
i Sent: Sunday, September 11, 2022 12:22 PM To: R help Mailing list mailto:r-help@r-project.org>> Subject: [R] inadequacy in as.integer [External Email] Dear members, I came across this queer thing during my analysis: > as.integer("09098") 9098

Re: [R] inadequacy in as.integer....

2022-09-11 Thread Bert Gunter
You seem to be confusing **what** is printed with *how* it is printed. > print(9) ## a numeric (not an integer, actually. That would be 9L) [1] 9 ## default print format > print(formatC(9, width =2, flag = "0")) ## format specification [1] "09" > print(formatC(9, width =2, flag = "0"), quote =

Re: [R] inadequacy in as.integer....

2022-09-11 Thread Andrew Simmons
gt; > Subject: RE: inadequacy in as.integer > > Keep as character. > > Tim > > -Original Message- > From: R-help On Behalf Of akshay kulkarni > Sent: Sunday, September 11, 2022 12:22 PM > To: R help Mailing list > Subject: [R] inadequacy in as.integer >

Re: [R] inadequacy in as.integer....

2022-09-11 Thread JRG via R-help
On 9/11/22 12:22, akshay kulkarni wrote: > Dear members, > I came across this queer thing during my analysis: >> as.integer("09098") > 9098 > > Any idea on how to retain the "0"? Don't use as.integer(), which has performed precisely the service that it advertises? I certainly wouldn't call this