Incorrect big.mark in the df.format
jkomelj opened this issue · 3 comments
In my country, the default is dec.mark="," and big.mark=".", but the function format.df does not work correct, if called with these parameters. Doing some minor changes in it, e.g. dec.mark=getOption("OutDec"), I was able to fix it for my needs. But whatever I try, big.mark in the result is always a comma instead of dot. However, formatting the data frame column by column with other functions, I can bypass the problem, but it would be nice, if format.df could be used. I mainly use the latex function. It is great. Thank you.
Janez Komelj, Slovenia
An example:
require(Hmisc)
A <- data.frame(a=c(123456.12345,654321.987654),b=c(654321.987654,123456.12345))
B <- format.df(A,cdec=c(2,3),dec.mark=",",big.mark=".")
I changed format.df to use OutDec
when cdot
is not specified. This should fix it. Thanks.