What is Git

The preferred workflow for Git

GitFlow Branching Model

A realistic workflow for Git

XKCD Branching Model

Setup

Working with RStudio

R Markdown

library(lme4) #glmer
library(readr)
SchoolData<-read_tsv("https://raw.githubusercontent.com/MixedModels/LearningMLwinN/master/tutorial.txt")
SchoolData$school<-factor(SchoolData$school)
SchoolData$girl<-factor(SchoolData$girl)
MOD.1 <- lmer(normexam ~ standlrt + (1|school), data = SchoolData, REML=F)
summary(MOD.1)
## Linear mixed model fit by maximum likelihood  ['lmerMod']
## Formula: normexam ~ standlrt + (1 | school)
##    Data: SchoolData
## 
##      AIC      BIC   logLik deviance df.resid 
##   9366.7   9391.9  -4679.4   9358.7     4055 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.7192 -0.6290  0.0266  0.6850  3.2723 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  school   (Intercept) 0.09217  0.3036  
##  Residual             0.56594  0.7523  
## Number of obs: 4059, groups:  school, 65
## 
## Fixed effects:
##             Estimate Std. Error t value
## (Intercept) 0.001539   0.040031    0.04
## standlrt    0.563440   0.012469   45.19
## 
## Correlation of Fixed Effects:
##          (Intr)
## standlrt 0.008

Working with GitHub Desktop

A few additional considerations

Beyond R

pandoc -r markdown  -s -S --latex-engine=pdflatex --template=letter.template -o letter.pdf letter.md 

can convert this:

---
address:
 - Senior Scientific Editor
 - Nature
opening: Dear Sir,
closing: Yours sincerely

...


**RE: Manuscript submission.**

I write to ask you to consider for publication in your august journal our attached manuscript entitled: “Genome editing and precision medicine: a systems biology approach” by Heath O'Brien and co-authors.

In this landmark study will revolutionize our understanding of medicine and something about CRISPR. You would be a fool to pass up an opportunity to publish it.

When you do send decide to send it to reviewers, I suggest the following junior colleagues who would be too intimidated to criticize it, even anonymously: [...]

Thank you for your consideration.
into this:
Example Letter


Creative Commons Licence
Working with RStudio and Git by Heath O’Brien is licensed under a Creative Commons Attribution 4.0 International License.