A few days ago, I started writing on a german R-Script. Unfortunately, the following code chunk doesn't work when I knit()
the document:
@
<<>>=
äö <- ordered(c(1,3,2,2))
@
Can anyone help me solve this problem?
PS: I'm working with Linux.
Since you are using Linux, things should be easy. It is probably just a LaTeX problem; most importantly, did you specify the encoding of your document? e.g. \usepackage[utf8]{inputenc}
. This works for me under Ubuntu.
\documentclass[ngerman]{article}
\usepackage[utf8]{inputenc}
\begin{document}
<<>>=
äö <- ordered(c(1,3,2,2))
@
\end{document}
BTW, perhaps it is not a good idea to use non-ASCII characters in R object names, although they also work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With