Even though my Windows 7 locale settings specify using \",\" as a decimal separator, R and RStudio give me a \".\" separator. Is there any way to change this? Note the \"LC_
Based on the fact that you want to use it with (Pandoc) markdown as far as I can see from the blog comment where you referenced this question, I would also suggest to give a try to my pander package:
> library(pander)
> panderOptions('decimal.mark', ',')
> panderOptions('table.split.table', Inf)
> pander(head(iris))
-------------------------------------------------------------------
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
-------------- ------------- -------------- ------------- ---------
5,1 3,5 1,4 0,2 setosa
4,9 3 1,4 0,2 setosa
4,7 3,2 1,3 0,2 setosa
4,6 3,1 1,5 0,2 setosa
5 3,6 1,4 0,2 setosa
5,4 3,9 1,7 0,4 setosa
-------------------------------------------------------------------
Or PHP Markdown Extra syntax for easier usage with knitr
:
> pandoc.table(head(iris), style = 'rmarkdown')
| Sepal.Length | Sepal.Width | Petal.Length | Petal.Width | Species |
|:--------------:|:-------------:|:--------------:|:-------------:|:---------:|
| 5,1 | 3,5 | 1,4 | 0,2 | setosa |
| 4,9 | 3 | 1,4 | 0,2 | setosa |
| 4,7 | 3,2 | 1,3 | 0,2 | setosa |
| 4,6 | 3,1 | 1,5 | 0,2 | setosa |
| 5 | 3,6 | 1,4 | 0,2 | setosa |
| 5,4 | 3,9 | 1,7 | 0,4 | setosa |