eusebe / ascii

A R to ascii converter
http://eusebe.github.com/ascii
20 stars 11 forks source link

`decimal.mark` parameter does not work (?) #12

Open daroczig opened 12 years ago

daroczig commented 12 years ago

I tried to export some tables with ascii by setting the decimal.mark to , (Hungarian standard), but did not succeed:

> ascii(matrix(runif(2),2,2), digits=3, decimal.mark=',')
------- -------
0.989   0.989  
0.899   0.899  
------- -------

What am I missing? Sorry for lame question.

daroczig commented 12 years ago

It seems that using your nice tocharac function inside an ascii call resolves this problem:

> ascii(tocharac(matrix(runif(2),2,2), digits=3, decimal.mark=','))
------- -------
0,116   0,116  
0,173   0,173  
------- -------

Although I am still not sure if this is the standard way of specifying decimal.mark.

eusebe commented 12 years ago

No, you're right, it is a bug... I will fix that in a next release.

Thanks.

daroczig commented 12 years ago

Thank you really much, @eusebe !