1

This is my Rsweave reproducible code:

\documentclass{article}

\usepackage[a4paper,left=1.5cm,right=1.5cm,bottom=1cm,top=3cm]{geometry}
\usepackage[perpage]{footmisc} 
\usepackage{csquotes}  
\usepackage{pdflscape}
\usepackage{float}
\usepackage{setspace}

\usepackage{booktabs}

\usepackage{colortbl}
\usepackage{tabu}

\usepackage{makecell}

\usepackage{hyperref}
\usepackage[backend=bibtex, sorting=none]{biblatex}
\bibliography{references}

\begin{document}

<<maincode,include=FALSE, echo=TRUE>>=
library(knitr)
library(kableExtra)
@

<<results='asis',echo=FALSE>>=

summary_matrix<-matrix(nrow=3,ncol=4)
options(knitr.table.format = "latex")

colnames(summary_matrix)=c('sample A','sample B','sample C','sample D')

summary_matrix<-as.data.frame(summary_matrix)

rownames(summary_matrix)[1] <-  "$E(x_{s_{t+1}}^{can})$";
rownames(summary_matrix)[2] <-  "$E(x_{s_{t+1}}^{can})$";
rownames(summary_matrix)[3] <-  "$H(x_{s_{t+1}}^{can})$";


kable(summary_matrix, booktabs = TRUE, caption = "My table", escape = FALSE)

@


\end{document}

I would like to replace the x with Delta and the H with Sigma. In Latex would be $\Delta$ and $\sigma$, but I cant do it here.

How can I solve this?

Any help?

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.