Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged


Really it is much more simple that you tried. Be sure that you have installed knitr and tikzDevice in R, and compile thistest.Rnw file in Rstudio: \documentclass{article} \begin{document} <<test, echo=F,dev='tikz',message=FALSE,fig.width=2.5, fig.height=2.5 >>= # install.packages("tikzDevice") require(ggplot2) data <- data.frame(x=c(1,2,3,4,...


With $$ you are entering math mode. And in math mode you should use math fonts and math switches. \[\mathit{ABC} = \mathrm{minimum}{\mathit{XYZ}, \mathit{ZYX}}\]


A example code is worth a thousand words: \documentclass{article} \begin{document} <<echo=F,results="hide">>= set.seed(100) options(scipen=0) x <- rnorm(10, 155, 10) y <- rnorm(10, 150, 10) accept <- if (t.test(x,y)$p.value>0.05) {print("rejected")} else {print("accepted")} @ Our hypothesis that $x$ is taller than $y$ was \Sexpr{...


You need to redefine the definition of the style Routstyle for listings. In your used file Sweavel.sty it is defined as \lstdefinestyle{Routstyle}{% fancyvrb=false, literate={~}{{$\sim$}}1{R^2}{{$R^{2}$}}2{^}{{$^{\scriptstyle\wedge}$}}1{R-squared}{{$R^{2}$}}2,% frame=single, framerule=0.2pt, framesep=1pt, basicstyle=\Routcolor\Routsize\...

Top 50 recent answers are included