

Hello everyone!
I am writing up something (quickly) using LaTex and periodically refer to R
functions and packages.
What is the correct way to put those into LaTex, please? I know that R
itself is {\tt R}, but am not sure about the others.
Thanks for any help,
Sincerely,
Erin
PS Or should I just be doing this in R Studio, even though there is no
code, please?

Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston  Downtown
mailto: [hidden email]
[[alternative HTML version deleted]]
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


On 12/10/2015 12:10 PM, Erin Hodgess wrote:
> Hello everyone!
>
> I am writing up something (quickly) using LaTex and periodically refer to R
> functions and packages.
>
> What is the correct way to put those into LaTex, please? I know that R
> itself is {\tt R}, but am not sure about the others.
>
> Thanks for any help,
> Sincerely,
> Erin
> PS Or should I just be doing this in R Studio, even though there is no
> code, please?
>
>
When I refer to R function in a LaTeX document I tend to use \texttt{}
(same as your {\tt } construct). Historical convention rendered computer
code in a monospace font (akin to Courier) so that's what I follow.

Kevin E. Thorpe
Head of Biostatistics, Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael's
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: [hidden email] Tel: 416.864.5776 Fax: 416.864.3016
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


Great,
Thanks!
Erin
On Thu, Dec 10, 2015 at 11:14 AM, Kevin E. Thorpe < [hidden email]>
wrote:
> On 12/10/2015 12:10 PM, Erin Hodgess wrote:
>
>> Hello everyone!
>>
>> I am writing up something (quickly) using LaTex and periodically refer to
>> R
>> functions and packages.
>>
>> What is the correct way to put those into LaTex, please? I know that R
>> itself is {\tt R}, but am not sure about the others.
>>
>> Thanks for any help,
>> Sincerely,
>> Erin
>> PS Or should I just be doing this in R Studio, even though there is no
>> code, please?
>>
>>
>>
> When I refer to R function in a LaTeX document I tend to use \texttt{}
> (same as your {\tt } construct). Historical convention rendered computer
> code in a monospace font (akin to Courier) so that's what I follow.
>
> 
> Kevin E. Thorpe
> Head of Biostatistics, Applied Health Research Centre (AHRC)
> Li Ka Shing Knowledge Institute of St. Michael's
> Assistant Professor, Dalla Lana School of Public Health
> University of Toronto
> email: [hidden email] Tel: 416.864.5776 Fax: 416.864.3016
>

Erin Hodgess
Associate Professor
Department of Mathematical and Statistics
University of Houston  Downtown
mailto: [hidden email]
[[alternative HTML version deleted]]
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


Erin
There is a LaTeX package called listings. It has an R option to
prettyprint code. Never used it.
Joe
"Kevin E. Thorpe" < [hidden email]>
Sent by: "Rhelp" < [hidden email]>
12/10/2015 12:14 PM
To
Erin Hodgess < [hidden email]>,
cc
R help < [hidden email]>
Subject
Re: [R] Correct notation for functions, packages when using LaTex
On 12/10/2015 12:10 PM, Erin Hodgess wrote:
> Hello everyone!
>
> I am writing up something (quickly) using LaTex and periodically refer
to R
> functions and packages.
>
> What is the correct way to put those into LaTex, please? I know that R
> itself is {\tt R}, but am not sure about the others.
>
> Thanks for any help,
> Sincerely,
> Erin
> PS Or should I just be doing this in R Studio, even though there is no
> code, please?
>
>
When I refer to R function in a LaTeX document I tend to use \texttt{}
(same as your {\tt } construct). Historical convention rendered computer
code in a monospace font (akin to Courier) so that's what I follow.

Kevin E. Thorpe
Head of Biostatistics, Applied Health Research Centre (AHRC)
Li Ka Shing Knowledge Institute of St. Michael's
Assistant Professor, Dalla Lana School of Public Health
University of Toronto
email: [hidden email] Tel: 416.864.5776 Fax: 416.864.3016
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide
http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.
[[alternative HTML version deleted]]
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


While we're at it: There is another LaTeX package called minted. It
has an R option to highlight R code. I've used it and it works well,
though it depends on python and the pygments python package.
Ista
On Thu, Dec 10, 2015 at 12:32 PM, < [hidden email]> wrote:
> Erin
> There is a LaTeX package called listings. It has an R option to
> prettyprint code. Never used it.
> Joe
>
>
>
>
> "Kevin E. Thorpe" < [hidden email]>
> Sent by: "Rhelp" < [hidden email]>
> 12/10/2015 12:14 PM
>
> To
> Erin Hodgess < [hidden email]>,
> cc
> R help < [hidden email]>
> Subject
> Re: [R] Correct notation for functions, packages when using LaTex
>
>
>
>
>
>
> On 12/10/2015 12:10 PM, Erin Hodgess wrote:
>> Hello everyone!
>>
>> I am writing up something (quickly) using LaTex and periodically refer
> to R
>> functions and packages.
>>
>> What is the correct way to put those into LaTex, please? I know that R
>> itself is {\tt R}, but am not sure about the others.
>>
>> Thanks for any help,
>> Sincerely,
>> Erin
>> PS Or should I just be doing this in R Studio, even though there is no
>> code, please?
>>
>>
>
> When I refer to R function in a LaTeX document I tend to use \texttt{}
> (same as your {\tt } construct). Historical convention rendered computer
> code in a monospace font (akin to Courier) so that's what I follow.
>
> 
> Kevin E. Thorpe
> Head of Biostatistics, Applied Health Research Centre (AHRC)
> Li Ka Shing Knowledge Institute of St. Michael's
> Assistant Professor, Dalla Lana School of Public Health
> University of Toronto
> email: [hidden email] Tel: 416.864.5776 Fax: 416.864.3016
>
> ______________________________________________
> [hidden email] mailing list  To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/rhelp> PLEASE do read the posting guide
> http://www.Rproject.org/postingguide.html> and provide commented, minimal, selfcontained, reproducible code.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list  To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/rhelp> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html> and provide commented, minimal, selfcontained, reproducible code.
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


On 11/12/15 06:10, Erin Hodgess wrote:
> Hello everyone!
>
> I am writing up something (quickly) using LaTex and periodically refer to R
> functions and packages.
>
> What is the correct way to put those into LaTex, please? I know that R
> itself is {\tt R}, but am not sure about the others.
Actually I much prefer \textsf{R}  and insist on this in papers
submitted to ANZJS. The Journal of Statistical Software uses a macro
\proglang which renders R in sans serif font  so this *must* be the
correct font.
cheers,
Rolf

Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +6493737599 ext. 88276
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


Rolf I believe \textsf is the correct font to use for the symbol R but
not necessarily for the names of R variables and functions. I'd like
more discussion about that.
Frank


Frank E Harrell Jr Professor and Chairman School of Medicine
Department of *Biostatistics* *Vanderbilt University*
[[alternative HTML version deleted]]
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.
Frank Harrell
Department of Biostatistics, Vanderbilt University


On 12/12/15 09:26, Frank Harrell wrote:
> Rolf I believe \textsf is the correct font to use for the symbol R but
> not necessarily for the names of R variables and functions. I'd like
> more discussion about that.
I agree; the names of R variables and functions are *code* and should be
rendered in "typewriter" font using \texttt{}. (IMHO.)
cheers,
Rolf

Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +6493737599 ext. 88276
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.

