[D-RUG]: Work session, this MONDAY (1/22) 10-12pm

21 views
Skip to first unread message

Ryan Peek

unread,
Jan 20, 2018, 8:29:58 PM1/20/18
to davi...@googlegroups.com
Hi D-RUGgies,

Just a reminder we will be hosting our weekly work-session on Monday from 10am-12pm in the DSI 360 room. 

As always, these working sessions are open to anyone/everyone interested in R, beginning to advanced. If you have interest in presenting on a topic, or hearing more about a topic (package, code, data, etc.), please let me know.

See you Monday!

Adios,
Ryan
--

 
"When we try to pick out anything by itself, we find it hitched to everything else in the universe."
John Muir (My First Summer in the Sierra, 1911)
-----------------------------------------------------
Ryan Peek
PhD Candidate, Graduate Group in Ecology
Center for Watershed Sciences, UC Davis

-----------------------------------------------------

Hannah Waterhouse

unread,
Jan 21, 2018, 4:48:24 PM1/21/18
to davi...@googlegroups.com
Hey All,
I'm interested in learning LaTex (and overleaf) - was wondering if there could be a workshop/session on sweave in R (I believe this allows an interface between the two) if anyone feels like they could give a tutorial that would be awesome!

Thanks,
Hannah

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/davis-rug.
For more options, visit https://groups.google.com/d/optout.



--
Hannah Waterhouse, M.S.
PhD Candidate, Soils and Biogeochemistry Graduate Group
University of California, Davis

Michael Hannon

unread,
Jan 21, 2018, 5:53:54 PM1/21/18
to davi...@googlegroups.com
I'd suggest you might want to use knitr/rmarkdown instead of sweave.  You can embed LaTeX directly into rmarkdown documents.

-- Mike

Hannah Waterhouse

unread,
Jan 21, 2018, 6:40:14 PM1/21/18
to davi...@googlegroups.com
Thanks Mike,
Curious to hear more about the reasons. Are knitr/rmarkdown good for publication quality manuscripts? I know with Overleaf (and I believe LaTex) you can import different journals styles/layout/formatting which seems pretty helpful. Let me know if you have time/care to comment.

Thanks!
~H

Michael Hannon

unread,
Jan 21, 2018, 11:16:45 PM1/21/18
to davi...@googlegroups.com
Hi, Hannah.  I haven't used Overleaf (but I can see some use for it among some people I work with).  And I've personally used knitr/rmarkdown only to produce documents for my colleagues.  I can't comment as to how it might interface to, say, stylesheets for a given journal.  But I do note that it's possible to include LaTeX packages -- as well as LaTeX code, of course -- in Rmd documents.  See the appended for a slightly-edited example of the YAML section of one of my Rmd documents.

Regarding the motivation for my suggestion: I just have the impression that the knitr/rmarkdown stuff is being actively developed by the RStudio folks.  If improvements are going to appear, it seems likely that they will appear first (only?) in knitr/rmarkdown.  You can see the advertising copy at:


and I now discover that there are formats for some journals:


-- Mike

Appendix: including LaTeX packages via rmarkdown YAML

---
title: blah, blah
author:
fontsize: 12pt
output:
  pdf_document:
    md_extensions: +fancy_lists
header-includes:
- \usepackage{array}
- \usepackage{multirow}
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \fancyhead{}
- \fancyfoot{}
- \fancyhead[CO,CE]{}
- \renewcommand{\headrulewidth}{0.0pt}
- \renewcommand{\footrulewidth}{1.0pt}
- \lfoot{\textbf{Johd Doe}}
- \cfoot{Non-disclosure agreement}
- \rfoot{\thepage}
---

Ryan Peek

unread,
Jan 22, 2018, 1:12:47 AM1/22/18
to davi...@googlegroups.com
Hi all,

A few thoughts. Great suggestion for a workshop, however, I'm not sure the D-RUG is the best place to have a LaTeX talk (unless we have a volunteer willing!). But, a recent UC Davis grad, Brendan Barrett gave a great tutorial on using LaTeX and overleaf last quarter. The video is here, and the overleaf file is here.

Having said that, as Michael mentions, RMarkdown is really an amazing and excellent platform that can be used to write manuscripts (see here and here too), dissertations (even a UCD version which is only in Markdown), etc. I'm currently using it for a manuscript and it's been great thus far.

I think there are lots of options to integrate RMarkdown and LaTeX.  Here's a few additional things folks might find useful:
  • A recent package called TinyTeX (written by the same person who wrote the knitr, bookdown, and xaringan packages, all worth checking out) is a nice way to get LaTeX installed on your machine via R.
  • For citations, there is a great add in called citr, which makes it easy to add citations to a RMarkdown or markdown file. You can add a csl file for just about any journal of your choosing (see this RStudio help page on bibliographies and citations) and it will format the citations automatically.
Hope this is useful.

Adios,
Ryan

C. Titus Brown

unread,
Jan 22, 2018, 8:32:53 AM1/22/18
to davi...@googlegroups.com
I or someone in my group would, I'm sure, be happy to give an intro
to LaTeX and overleaf; we use LaTeX for lots of things, overleaf
at least occasionally.

But beware - LaTeX is like programming. 95% of the time it goes smoothly
and then there's the three hours where you try to figure out what the
compile bug is :)

best,
--titus

On Sun, Jan 21, 2018 at 10:12:44PM -0800, Ryan Peek wrote:
> Hi all,
>
> A few thoughts. Great suggestion for a workshop, however, I'm not sure the
> D-RUG is the best place to have a LaTeX talk (unless we have a volunteer
> willing!). But, a recent UC Davis grad, Brendan Barrett gave a great
> tutorial on using LaTeX and overleaf last quarter. The video is here
> <https://youtu.be/5dnK2knSu0Q>, and the overleaf file is here
> <https://www.overleaf.com/read/vtksfyhbcthw>.
>
> Having said that, as Michael mentions, RMarkdown is really an amazing and
> excellent platform that can be used to write manuscripts
> <http://svmiller.com/blog/2016/02/svm-r-markdown-manuscript/> (see here
> <http://rmhogervorst.nl/cleancode/blog/2017/03/14/writing-manuscripts-in-rstudio.html>
> and here <https://libscie.github.io/rmarkdown-workshop/handout.html> too),
> dissertations <https://github.com/ismayc/thesisdown> (even a UCD version
> which is only in Markdown
> <https://github.com/davharris/Davis-dissertation-template>), etc. I'm
> currently using it for a manuscript and it's been great thus far.
>
> I think there are lots of options to integrate RMarkdown and LaTeX. Here's
> a few additional things folks might find useful:
>
> - A recent package called TinyTeX <https://yihui.name/tinytex/> (written
> by the same person who wrote the knitr, bookdown, and xaringan packages,
> all worth checking out) is a nice way to get LaTeX installed on your
> machine via R.
> - For citations, there is a great add in called *citr
> <https://github.com/crsh/citr>, *which makes it easy to add citations to
> a RMarkdown or markdown file. You can add a csl file for just about any
> journal of your choosing (see this RStudio help page on bibliographies
> and citations
> <http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html>)
> >>>>> Just a reminder we will be hosting our weekly work-session on *Monday
> >>>>> from 10am-12pm in the DSI 360 room. *
> >>>>>
> >>>>> As always, these working sessions are open to anyone/everyone
> >>>>> interested in R, beginning to advanced. If you have interest in presenting
> >>>>> on a topic, or hearing more about a topic (package, code, data, etc.),
> >>>>> please let me know.
> >>>>>
> >>>>> See you Monday!
> >>>>>
> >>>>> Adios,
> >>>>> Ryan
> >>>>> --
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> *"When we try to pick out anything by itself, we find it hitched to
> >>>>> everything else in the universe."John Muir (My First Summer in the Sierra,
> >>>>> 1911)*
> >>>>> *-----------------------------------------------------*
> >>>>> Ryan Peek
> >>>>> PhD Candidate, Graduate Group in Ecology
> >>>>> Center for Watershed Sciences, UC Davis
> >>>>> *ryanpeek.github.io <http://ryanpeek.github.io>*
> >>>>> *@riverpeek*
> >>>>> 530.754.5351 <(530)%20754-5351>
> >>>>>
> >>>>> *-----------------------------------------------------*
> >>>>>
> >>>>> --
> >>>>> Check out our R resources at http://d-rug.github.io/
> >>>>> ---
> >>>>> You received this message because you are subscribed to the Google
> >>>>> Groups "Davis R Users' Group" group.
> >>>>> To unsubscribe from this group and stop receiving emails from it, send
> >>>>> an email to davis-rug+...@googlegroups.com.
> >>>>> Visit this group at https://groups.google.com/group/davis-rug.
> >>>>> For more options, visit https://groups.google.com/d/optout.
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Hannah Waterhouse, M.S.
> >>>> PhD Candidate, Soils and Biogeochemistry Graduate Group
> >>>> University of California, Davis
> >>>>
> >>>> --
> >>>> Check out our R resources at http://d-rug.github.io/
> >>>> ---
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Davis R Users' Group" group.
> >>>> To unsubscribe from this group and stop receiving emails from it, send
> >>>> an email to davis-rug+...@googlegroups.com.
> >>>> Visit this group at https://groups.google.com/group/davis-rug.
> >>>> For more options, visit https://groups.google.com/d/optout.
> >>>>
> >>>
> >>> --
> >>> Check out our R resources at http://d-rug.github.io/
> >>> ---
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Davis R Users' Group" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send
> >>> an email to davis-rug+...@googlegroups.com.
> >>> Visit this group at https://groups.google.com/group/davis-rug.
> >>> For more options, visit https://groups.google.com/d/optout.
> >>>
> >>
> >>
> >>
> >> --
> >> Hannah Waterhouse, M.S.
> >> PhD Candidate, Soils and Biogeochemistry Graduate Group
> >> University of California, Davis
> >>
> >> --
> >> Check out our R resources at http://d-rug.github.io/
> >> ---
> >> You received this message because you are subscribed to the Google Groups
> >> "Davis R Users' Group" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to davis-rug+...@googlegroups.com.
> >> Visit this group at https://groups.google.com/group/davis-rug.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >
> > --
> > Check out our R resources at http://d-rug.github.io/
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Davis R Users' Group" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to davis-rug+...@googlegroups.com.
> > Visit this group at https://groups.google.com/group/davis-rug.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
>
> --
>
>
>
>
> *"When we try to pick out anything by itself, we find it hitched to
> everything else in the universe."John Muir (My First Summer in the Sierra,
> 1911)*
> *-----------------------------------------------------*
> Ryan Peek
> PhD Candidate, Graduate Group in Ecology
> Center for Watershed Sciences, UC Davis
> *ryanpeek.github.io <http://ryanpeek.github.io>*
> *@riverpeek*
> 530.754.5351
>
> *-----------------------------------------------------*
>
> --
> Check out our R resources at http://d-rug.github.io/
> ---
> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+...@googlegroups.com.
> Visit this group at https://groups.google.com/group/davis-rug.
> For more options, visit https://groups.google.com/d/optout.

--
C. Titus Brown, ctb...@ucdavis.edu

Hannah Waterhouse

unread,
Jan 22, 2018, 12:36:35 PM1/22/18
to davi...@googlegroups.com
thank you everyone for your replies and resources! I know a few of us would be interested in another workshop but totally understand if it's too much to organize - I'm happy just listening to Brendan's voice too (miss that guy).

Thank you again!
H


> >>>>> Visit this group at https://groups.google.com/group/davis-rug.
> >>>>> For more options, visit https://groups.google.com/d/optout.
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Hannah Waterhouse, M.S.
> >>>> PhD Candidate, Soils and Biogeochemistry Graduate Group
> >>>> University of California, Davis
> >>>>
> >>>> --
> >>>> Check out our R resources at http://d-rug.github.io/
> >>>> ---
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Davis R Users' Group" group.
> >>>> To unsubscribe from this group and stop receiving emails from it, send

> >>>> Visit this group at https://groups.google.com/group/davis-rug.
> >>>> For more options, visit https://groups.google.com/d/optout.
> >>>>
> >>>
> >>> --
> >>> Check out our R resources at http://d-rug.github.io/
> >>> ---
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Davis R Users' Group" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send

> >>> Visit this group at https://groups.google.com/group/davis-rug.
> >>> For more options, visit https://groups.google.com/d/optout.
> >>>
> >>
> >>
> >>
> >> --
> >> Hannah Waterhouse, M.S.
> >> PhD Candidate, Soils and Biogeochemistry Graduate Group
> >> University of California, Davis
> >>
> >> --
> >> Check out our R resources at http://d-rug.github.io/
> >> ---
> >> You received this message because you are subscribed to the Google Groups
> >> "Davis R Users' Group" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an

> >> Visit this group at https://groups.google.com/group/davis-rug.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >
> > --
> > Check out our R resources at http://d-rug.github.io/
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Davis R Users' Group" group.
> > To unsubscribe from this group and stop receiving emails from it, send an

> > Visit this group at https://groups.google.com/group/davis-rug.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
>
> --
>
>
>
>
> *"When we try to pick out anything by itself, we find it hitched to
> everything else in the universe."John Muir (My First Summer in the Sierra,
> 1911)*
> *-----------------------------------------------------*
> Ryan Peek
> PhD Candidate, Graduate Group in Ecology
> Center for Watershed Sciences, UC Davis
> *ryanpeek.github.io <http://ryanpeek.github.io>*
> *@riverpeek*
> 530.754.5351
>
> *-----------------------------------------------------*
>
> --
> Check out our R resources at http://d-rug.github.io/
> ---
> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.

> Visit this group at https://groups.google.com/group/davis-rug.
> For more options, visit https://groups.google.com/d/optout.

--
C. Titus Brown, ctb...@ucdavis.edu

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.



--
Hannah Waterhouse, M.S.
PhD Candidate, Soils and Biogeochemistry Graduate Group
University of California, Davis

Matthieu Stigler

unread,
Jan 22, 2018, 12:36:43 PM1/22/18
to davi...@googlegroups.com, hwate...@ucdavis.edu
Hi Hannah

Adding a few thought to the topic. First of all, knitr is not only about markdown, but also LaTeX. So in general you would not use Sweave anymore, but knitr instead, then choose whether you want to type in markdown or LaTeX. It's a little confusing in Rstudio, as to write in TeX using knitr you would go create an R Sweave document (link)!

To choose between LaTeX and markdown, I would take these elements into account:

  • trade-off ease/complexity: either easy syntax for simple documents, or complicated syntax for very sophisticated documents.
  • publication-wise: which output is expected for the journals in your field? I am not aware of many journals accepting html manuscripts. There are a bunch of journals on the other side having LaTeX templates. But then markdown can also output in Word format, something most journals will accept...
  • tables in your paper: do you want to have fancy tables with regression output? Which R package will you use to create these tables? xtable? texreg? stargazer? Some of them output both in html or TeX, give it a try first?

Finally: there is the LyX software, a "Word-like" editor processing LaTeX underneath. Learning it will be even easier than learning the markdown syntax. And you run it with knitr too. That's very personal, but that's would be my favourite choice by far, helps you keeping a clean document while seeing the structure of your document immediately. So I would use this for my main paper, using knitr inside, together with tables exported in TeX format.

I am also happy to make a knitr/LaTeX presentation. I guess a TeX talk at RUG is as justified as... a markdown talk :-)

Matthieu




On Mon, Jan 22, 2018 at 5:32 AM, C. Titus Brown <ctb...@ucdavis.edu> wrote:

> >>>>> Visit this group at https://groups.google.com/group/davis-rug.
> >>>>> For more options, visit https://groups.google.com/d/optout.
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Hannah Waterhouse, M.S.
> >>>> PhD Candidate, Soils and Biogeochemistry Graduate Group
> >>>> University of California, Davis
> >>>>
> >>>> --
> >>>> Check out our R resources at http://d-rug.github.io/
> >>>> ---
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "Davis R Users' Group" group.
> >>>> To unsubscribe from this group and stop receiving emails from it, send

> >>>> Visit this group at https://groups.google.com/group/davis-rug.
> >>>> For more options, visit https://groups.google.com/d/optout.
> >>>>
> >>>
> >>> --
> >>> Check out our R resources at http://d-rug.github.io/
> >>> ---
> >>> You received this message because you are subscribed to the Google
> >>> Groups "Davis R Users' Group" group.
> >>> To unsubscribe from this group and stop receiving emails from it, send

> >>> Visit this group at https://groups.google.com/group/davis-rug.
> >>> For more options, visit https://groups.google.com/d/optout.
> >>>
> >>
> >>
> >>
> >> --
> >> Hannah Waterhouse, M.S.
> >> PhD Candidate, Soils and Biogeochemistry Graduate Group
> >> University of California, Davis
> >>
> >> --
> >> Check out our R resources at http://d-rug.github.io/
> >> ---
> >> You received this message because you are subscribed to the Google Groups
> >> "Davis R Users' Group" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an

> >> Visit this group at https://groups.google.com/group/davis-rug.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >
> > --
> > Check out our R resources at http://d-rug.github.io/
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "Davis R Users' Group" group.
> > To unsubscribe from this group and stop receiving emails from it, send an

> > Visit this group at https://groups.google.com/group/davis-rug.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
>
> --
>
>
>
>
> *"When we try to pick out anything by itself, we find it hitched to
> everything else in the universe."John Muir (My First Summer in the Sierra,
> 1911)*
> *-----------------------------------------------------*
> Ryan Peek
> PhD Candidate, Graduate Group in Ecology
> Center for Watershed Sciences, UC Davis
> *ryanpeek.github.io <http://ryanpeek.github.io>*
> *@riverpeek*
> 530.754.5351
>
> *-----------------------------------------------------*
>
> --
> Check out our R resources at http://d-rug.github.io/
> ---
> You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.

> Visit this group at https://groups.google.com/group/davis-rug.
> For more options, visit https://groups.google.com/d/optout.

--
C. Titus Brown, ctb...@ucdavis.edu

--
Check out our R resources at http://d-rug.github.io/
---
You received this message because you are subscribed to the Google Groups "Davis R Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to davis-rug+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages