Getting Started
Derailment has posts on how to set up a Mac:
There are also posts on how to set up a Windows machine:
There are posts on configuring and updating:
Why Bother?
renv
and extra software like docker
.
Demo
The rUM project template creates a folder that contains:
Authoring
The document is in a format called R Markdown
. It saves with a suffix of .Rmd
. You can use point-and-click tools to edit it.
Click the Visual Markdown Editor button:
It works like a word processor. Highlight and click a button.
Right click to fix spelling or add to the dictionary:
You can jump to sections using the document outline
You can jump to sections using the document outline
You can add IDs to sections of your paper (as well as figures/tables) and then put in hyperlinks. To add a section identifier:
You can add IDs to sections of your paper (as well as figures/tables) and then put in hyperlinks. To add a section identifier:
You can add IDs to sections of your paper (as well as figures/tables) and then put in hyperlinks. To add a section identifier:
If your paper is using section numbering, you can use the menu to add links to sections:
If your paper is using section numbering, you can use the menu to add links to sections:
If your paper is using section numbering, you can use the menu to add links to sections:
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
You can nest a calculation directly into the narrative by clicking the code button.
You can nest a calculation directly into the narrative by clicking the code button.
If you need to do something complicated, like calculating how many subjects were enrolled, you can add a code block. You can do some calculating, then reference the results.
Write your R code below the line with {r}. You can later reference any object you have created.
Write your R code below the line with {r}. You can later reference any object you have created.
And you can use functions in inline code.
Adding references/citations is simple:
There are many search engines to help you find your article:
New England Journal citations go at the end of a sentence.
The output appears as:
Search the Zotero Style Repository website and save the ".csl" file into your project folder.
Then change the YAML header in the ".Rmd" file to match the file you downloaded:
---title: "your_title_goes_here"author: "your_name_goes_here"date: "r Sys.Date()"output: bookdown::html_document2: number_sections: falsebibliography: [references.bib, packages.bib]csl: the-new-england-journal-of-medicine.csl---
If you download the apa.cls file into the project folder and tweak the YAML header, your references will appear in APA format.
End of Sentence References - use [ ]
Inline References - without [ ]
Using GitHub
git
and GitHub
GitHub
is a website that lets you share any file with the world.git
is software that helps you keep files synchronized and helps resolve conflicts if more than one person has edited the same part of a file.git
and GitHub
.
rUM
, it automatically puts a file into the project folder, called .gitignore
, which helps block the sharing of files that it recognizes as data.rUM
(1)You can copy the contents of the rUM folder into this GitHub enabled project folder but this requires a little care....
.gitignore
that was automatically created in the GitHub enabled project.rUM
(2)Move the content of your rUM
project folder into the GitHub enabled project folder.
.gitignore
file (which is hidden) along with everything else. shift
key and then tap the .
(period/decimal) key.⌘ shift .
again to hide the hidden files..
(period/decimal) are hidden on Mac.
By default, the RStudio IDE shows some hidden files:
By default, the finder hides all hidden files:
⌘ shift .
The finder hiding hidden files:
The finder showing hidden files:
.gitignore
file lists data files that I work with. If you work with other kinds of files that contain data, tell me and I will add them to my list. .gitignore
file lists data files that I work with. rUM
, go here: https://gist.github.com/RaymondBaliseCall your git/GitHub project back-up/repository/web-page a repo.
git
windowpane.git
windowpane.To use the git
terms:
To use the git
terms:
When you are on the commit screen you will see the sections that are changed. Deleted code will be in red. New code will be in green.
1) Follow the instructions to make a new GitHub project. That will give you the current state of the project.
2) Click the download button whenever you want to update the local information.
git
/GitHub?The most popular reference for R git
/GitHub integration is Happy Git and GitHub by Jenny Bryan and Jim Hester: https://happygitwithr.com/
After you get comfortable with R Markdown, look at Emily Riederer's talk:
It is insightful and easy to follow.
Start here:
Incredibly influential:
Important:
Getting Started
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
o | Tile View: Overview of Slides |
Esc | Back to slideshow |
Getting Started
Derailment has posts on how to set up a Mac:
There are also posts on how to set up a Windows machine:
There are posts on configuring and updating:
Why Bother?
renv
and extra software like docker
.
Demo
The rUM project template creates a folder that contains:
Authoring
The document is in a format called R Markdown
. It saves with a suffix of .Rmd
. You can use point-and-click tools to edit it.
Click the Visual Markdown Editor button:
It works like a word processor. Highlight and click a button.
Right click to fix spelling or add to the dictionary:
You can jump to sections using the document outline
You can jump to sections using the document outline
You can add IDs to sections of your paper (as well as figures/tables) and then put in hyperlinks. To add a section identifier:
You can add IDs to sections of your paper (as well as figures/tables) and then put in hyperlinks. To add a section identifier:
You can add IDs to sections of your paper (as well as figures/tables) and then put in hyperlinks. To add a section identifier:
If your paper is using section numbering, you can use the menu to add links to sections:
If your paper is using section numbering, you can use the menu to add links to sections:
If your paper is using section numbering, you can use the menu to add links to sections:
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
If your paper is not using section numbering, you need to type some markdown
code. The syntax to cross reference a section is:
[label](#link)
where the label is the text for the reader and #link is the section ID.
You can nest a calculation directly into the narrative by clicking the code button.
You can nest a calculation directly into the narrative by clicking the code button.
If you need to do something complicated, like calculating how many subjects were enrolled, you can add a code block. You can do some calculating, then reference the results.
Write your R code below the line with {r}. You can later reference any object you have created.
Write your R code below the line with {r}. You can later reference any object you have created.
And you can use functions in inline code.
Adding references/citations is simple:
There are many search engines to help you find your article:
New England Journal citations go at the end of a sentence.
The output appears as:
Search the Zotero Style Repository website and save the ".csl" file into your project folder.
Then change the YAML header in the ".Rmd" file to match the file you downloaded:
---title: "your_title_goes_here"author: "your_name_goes_here"date: "r Sys.Date()"output: bookdown::html_document2: number_sections: falsebibliography: [references.bib, packages.bib]csl: the-new-england-journal-of-medicine.csl---
If you download the apa.cls file into the project folder and tweak the YAML header, your references will appear in APA format.
End of Sentence References - use [ ]
Inline References - without [ ]
Using GitHub
git
and GitHub
GitHub
is a website that lets you share any file with the world.git
is software that helps you keep files synchronized and helps resolve conflicts if more than one person has edited the same part of a file.git
and GitHub
.
rUM
, it automatically puts a file into the project folder, called .gitignore
, which helps block the sharing of files that it recognizes as data.rUM
(1)You can copy the contents of the rUM folder into this GitHub enabled project folder but this requires a little care....
.gitignore
that was automatically created in the GitHub enabled project.rUM
(2)Move the content of your rUM
project folder into the GitHub enabled project folder.
.gitignore
file (which is hidden) along with everything else. shift
key and then tap the .
(period/decimal) key.⌘ shift .
again to hide the hidden files..
(period/decimal) are hidden on Mac.
By default, the RStudio IDE shows some hidden files:
By default, the finder hides all hidden files:
⌘ shift .
The finder hiding hidden files:
The finder showing hidden files:
.gitignore
file lists data files that I work with. If you work with other kinds of files that contain data, tell me and I will add them to my list. .gitignore
file lists data files that I work with. rUM
, go here: https://gist.github.com/RaymondBaliseCall your git/GitHub project back-up/repository/web-page a repo.
git
windowpane.git
windowpane.To use the git
terms:
To use the git
terms:
When you are on the commit screen you will see the sections that are changed. Deleted code will be in red. New code will be in green.
1) Follow the instructions to make a new GitHub project. That will give you the current state of the project.
2) Click the download button whenever you want to update the local information.
git
/GitHub?The most popular reference for R git
/GitHub integration is Happy Git and GitHub by Jenny Bryan and Jim Hester: https://happygitwithr.com/
After you get comfortable with R Markdown, look at Emily Riederer's talk:
It is insightful and easy to follow.
Start here:
Incredibly influential:
Important: