Displaying 20 results from an estimated 200 matches similar to: "Insert R code in LaTeX document"
2007 Jan 15
4
How to format R code in LaTex documents
Hi,
I am planning on putting some R script in an appendix of a LaTex
document. Can anyone recommend me a way of how to format it? Is there
a way to keep all line breaks without having to insert \\ in every
single line?
Thank you!
Benjamin
2011 Nov 23
1
R-latex syntax highlighting?
Hello,
Can anyone provide or point me to a good setup for the listings latex package that would produce nice R-syntax highlighting?
I am using an example I found in internet for setting up listings like this:
\lstset{
language=R,
basicstyle=\scriptsize\ttfamily,
commentstyle=\ttfamily\color{gray},
numbers=left,
numberstyle=\ttfamily\color{red}\footnotesize,
stepnumber=1,
numbersep=5pt,
2012 Nov 01
1
How to nicely display R code with the LaTeX package 'listings'?
Dear expeRts,
What's a 'good' (nice-looking, easy-to-read) setup for the LaTeX package
'listings' to display R code?
The two versions below are partly inspired by the settings of the package
SweaveListingUtils and
http://r.789695.n4.nabble.com/R-How-to-format-R-code-in-LaTex-documents-td816055.html
Any suggestions, comments, or improvements are welcome.
Cheers,
Marius
###
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
This is what I have been using. Does anyone have a better way? In
particular I would like to see letters in comment strings not stretched
so much. Thanks -Frank
\documentclass{article}
\usepackage{listings,relsize}
\lstloadlanguages{R}
\newcommand{\lil}[1]{\lstinline|#1|}
\begin{document}
\lstset{language=R,basicstyle=\smaller,commentstyle=\rmfamily\smaller,
showstringspaces=false,%
2004 Oct 04
4
Off-Topic: LaTeX package listings
Hola!
I ask here since I learnt from this list that the LaTeX package listings
should be good
for typesetting R code. I encountered one problem:
\begin{lstlisting}
X %*% V
\end{lstlisting}
in the output the * in %*% disappears! same with %/%, etc, the /
disappears.
Any ideas?
Kjetil
--
Kjetil Halvorsen.
Peace is the most effective weapon of mass construction.
--
2005 Jan 07
6
Compilation of R code
Hello,
I'm a newbie on this list.
I have a R code but its execution take a very long time.
Is it possible to compile it (in C for example) to decrease the execution
time ?
--
----------------
Alexandre DEPIRE
INRETS / GARIG
2005 Jan 07
6
Compilation of R code
Hello,
I'm a newbie on this list.
I have a R code but its execution take a very long time.
Is it possible to compile it (in C for example) to decrease the execution
time ?
--
----------------
Alexandre DEPIRE
INRETS / GARIG
2005 Feb 04
2
Compilation of R (linux) package on windows
Hello,
I develop some R package on Linux machine with C subroutines.
The programs in C are well compiled on Linux machine and so I have some ".so"
files.
Now, I want to do the same work on windows, so I install R (the last version)
on windows, with Active Perl and djgpp, which is, as I know, the gcc version
for windows (to compile C program), but unfortunately when I run "R CMD
2005 Feb 01
2
sgeostat
Hi, list,
I am using 'sgeostat' package by Albrecht Gebhardt and I am trying to put a
correlation coefficient of some kind on the lagplots. Is there a possiblity
to do so?
Thanks
Mahdi
--
-----------------------------------
Mahdi Osman (PhD)
E-mail: m_osm at gmx.net
-----------------------------------
GMX im TV ... Die Gedanken sind frei ... Schon gesehen?
Jetzt Spot online ansehen:
2006 Feb 28
3
LaTeX in R graph
Hello,
I would like to know if it is possible to insert LaTeX typesetting in R output.
I want to obtain a graph with LaTeX label in order to incorporate it as
postscript or pdf,
x<-seq(0,1,length=100)
y<-x*x
plot(x,y,xlab="$X$",ylab="$X^2$")
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl,
I'm using something like:
----------------------- tex.tex ---------------------------
\documentclass{article}
\usepackage{graphicx}
\usepackage{fancyvrb}
\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}}
\newcommand{\myinput}[1] {\begin{scriptsize}
\VerbatimInput[frame=single,label=#1]{#1}
\end{scriptsize}}
\title{The R logo,
2006 Sep 15
2
Histogram of data with categorical varialbe
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20060915/8b4027b0/attachment.pl
2008 Sep 12
1
sink file type and Latex (Lyx)
Does anyone know what file type sink is outputting to? I've been
reverting output from R using sink and wanted to add it to my Appendix
in LaTex (Lyx) using "Verbatiminput". However, I get an error message as
LaTex is expecting an ASCII file.
Can I set sink somehow to ASCII or is there another option?
Thanks Joanne
2008 Oct 17
1
R-code in Latex --- $ sign causes error
hi,
here's what i have:
\lstset{
basicstyle=\ttfamily,
keywordstyle=\bfseries,
showstringspaces=false,
columns = fullflexible,
mathescape = true,
language=R
}
\begin{lstlisting}
lst$val<-val
\end{lstlisting}
./software.tex:16:Extra }, or forgotten \endgroup. lst$
the culprit here is the $ sign.
thanks.
ps:
i'm posting here rather than Latex is bec i guess an R user is
2004 Apr 26
1
need settings for the listings package
Hi,
I am typesetting R code in TeX using the listings package. I have
experimented with various settings for the text, but all look a bit
ugly. This might be because I have no typographic experience ;-)
I would really appreciate if people sent me the settings they use for
the listings package (eg in the \usepackage line, or \lstset, I am
thinking about choices for basicstyle, ... etc). I
2005 Jun 01
3
histogramm?
Hello there!
When I do freq=F on hist, I get on the left a small number, what exactly
does that mean?
Thanks,
Martin
2003 Apr 05
3
slides in linux R
Hello,
In S-Plus Windows you can transform graphics to Powerpoint very easily, in R Windows you can use enhanced metafiles (.emf) and Powerpoint almost as easy. Is there a simular way with R in Linux to transform to the presentation program in StarOffice or OpenOffice or are you stuck with the pdf device?
Fredrik Lundgren
2009 Jan 28
2
OT: Adding verbatim R code text into LaTeX documents: texttt; verb or url?
Hi all
I use Sweave extensively to mix R and LaTeX, and often have R code appearing in my LaTeX document.
Just a quick question then: What is the best way to add example of R commands into LaTeX in-line? (That is, not using Sweave.) For example, suppose I wish to place in my document this instruction:
...is done in R using the command \verb|lm( y ~ var.one + var.two )| as follows:
I
2009 Jan 08
10
help
Hi:
I am going through some of the xtable examples and I can't make the one below work. I need to create a longtable on the fly keeping the column headers for all the pages and I thought this example could give some ideas on how to do it. I am using Sweave and xtable to create my tables and graphics. I wonder if someone could tell me what's wrong. Thanks
## Not run:
\begin{small}