Displaying 2 results from an estimated 2 matches for "revstr".
Did you mean:
refstr
2005 Jun 22
10
How to read an excel data into R?
Hi all,
Does anybody know the easiest way to import excel data into R? I copied
and pasted the excel data into a txt file, and tried read.table, but R
reported that
Error in read.table("data_support.txt", sep = " ", header = T) :
more columns than column names
Thanks!
Ling
2002 May 13
1
prettyNum inserts leading commas (PR#1548)
...;,123,456,789"
and that bad behavior (leading comma) spills into formatC as well:
R> formatC(123456789, digits=0, format="f", big.mark=",")
[1] ",123,456,789"
Looks to me like a bug in src/library/base/R/format.R, in function prettyNum:
B.[i.big] <- revStr(gsub(P0("([0-9]{",big.interval,"})"), # Original
P0("\\1",big.mark), revStr(B.[i.big])))
where we reverse the "before-the-decimal" string, then put a comma after each
set of 3 digits. One solution is to make the first reg...