I am using RMarkdown to create a Word document that contains several sentences with numbers inserted to them as inline R chunks. I would like to use non-breaking spaces as thousands separator, but cannot seem to find a way to do this. I have found solutions for HTML and PDF outputs, but not for Word output.
---
output: word_document
---
This is a long sentence with some numbers, so I would like to use non-breaking spaces as thousands separator. For instance, in the number `r formatC(1234, big.mark = " ")`.
Any help would be much appreciated.
You can input the non-breaking space using its Unicode escape, i.e.
formatC(1234, big.mark = "\ua0").