1

This is my Rsweave reproducible example:

\documentclass{article}

\DeclareUnicodeCharacter{3B1}{$\alpha$}
\DeclareUnicodeCharacter{3C4}{$\tau$}
\DeclareUnicodeCharacter{3C3}{$\sigma$}
\DeclareUnicodeCharacter{3B2}{$\beta$}
\DeclareUnicodeCharacter{3B3}{$\gamma$}
\DeclareUnicodeCharacter{3BC}{$\mu$}
\DeclareUnicodeCharacter{394}{$\Delta$}

\begin{document}

This is a table

    <<summarymatrix,echo=FALSE>>=
    library(knitr)
    library(kableExtra)
alpha='\u03b1'; tau='\u03c4'; sigma='\u03c3'; beta='\U03B2'; gamma='\u03b3'; mu='\u03BC'; Delta='\u0394'

    dt <- mtcars[1:5, 1:3]
    colnames(dt)=c('Sample1','Sample2','Sample3')
    rownames(dt)=c(paste0(mu),paste0(tau),paste0(sigma),paste0(beta),paste0(Delta))


    dt
    @

    \end{document}

There are two problems:

First the Delta rowname is placed at the wrong positionin my output table. Should be in the 5-th row. And the first rowname should be mu.

Second, why I can not have repeated symbols as rows? For example, how can I put the second and the thirs rownames as Beta?

And also I am having this error message: Package inputenc Error: Unicode character mu (U+B5)

How can I solve this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.