Skip to content
Snippets Groups Projects
Commit ddca8a8c authored by grandjeanlab's avatar grandjeanlab
Browse files

details /tableflip

parent 41ff27ea
Branches master
No related tags found
No related merge requests found
...@@ -32,15 +32,15 @@ If git is installed, R studio will download (aka 'pull') the code from the gitla ...@@ -32,15 +32,15 @@ If git is installed, R studio will download (aka 'pull') the code from the gitla
R is a powerful software for statistical analysis. It allows for simple table manipulations, and graph plots. In addition to the basic software, it also comes with several dedicated packages which enhances specific aspects, such as plotting with ggplot2 (grammar of graphic), or linear mixed models with lme4. R is a powerful software for statistical analysis. It allows for simple table manipulations, and graph plots. In addition to the basic software, it also comes with several dedicated packages which enhances specific aspects, such as plotting with ggplot2 (grammar of graphic), or linear mixed models with lme4.
Modern installments of R, through the graphical user interface R studio allow to keep R notebooks which combine text (and simple formatting rules => markdown), with traditional codes. This is was we are using now. This section is part of the text. Code examples will follow below. Interestingly, R notebook can integrate code from multiple languages into one notebook (one notebook to rule them all). For instance, it can run `bash` code, `python`, and of course, `r`. Modern installments of R, through the graphical user interface R studio allow to keep R notebooks which combine text (and simple formatting rules => [markdown](https://en.wikipedia.org/wiki/Markdown)), with traditional codes. This is what we are using now. This section is part of the text. Code examples will follow below. Interestingly, R notebook can integrate code from multiple languages into one notebook (one notebook to rule them all). For instance, it can run `bash` code, `python`, and of course, `r`.
In this exercise, we will see how a R notebook is kept, how to do basic text formatting, how to integrate `r` code into the document, and how to output this into a document that can be shared (e.g. html or pdf). Finally we will see how Rstudio integrates `git` for version control, project management, and collaborative work. In this exercise, we will see how a R notebook is kept, how to do basic text formatting, how to integrate `r` code into the document, and how to output this into a document that can be shared (e.g. html, pdf, md). Finally we will see how Rstudio integrates `git` for version control, project management, and collaborative work.
### Lab journal introduction ### Lab journal introduction
The idea being a lab journal is to keep track of protocols, analysis, results, and to provide a short interpretation of the results. This allows the supervisor to keep track of the progress, it also allows the student to have a track-record of previous experiments and what how protocols and analysis evolved over time. The idea being a lab journal is to keep track of protocols, analysis, results, and to provide a short interpretation of the results. This allows the supervisor to keep track of the progress, it also allows the student to have a track-record of previous experiments and what how protocols and analysis evolved over time.
The R notebook formats allows adding images to the notebook, text comments, but also, code. By using git, the student ensures that the lab journal is archived and accessible for later use (e.g. by future students, etc..) The R notebook format allows adding images to the notebook, text comments, but also, code. By using git, the student ensures that the lab journal is archived and accessible for later use (e.g. by future students, etc..)
Fundamentally, your lab journal can be organized in two ways, either chronologically, or following a narrative. Fundamentally, your lab journal can be organized in two ways, either chronologically, or following a narrative.
...@@ -57,7 +57,7 @@ I've learnt that I can implement codes in my lab notebook. I've learn that the ` ...@@ -57,7 +57,7 @@ I've learnt that I can implement codes in my lab notebook. I've learn that the `
#### Narrative lab journal #### Narrative lab journal
##### Intro ##### Intro
This is the intro to my project I seek to learn how to use R and R notebooks
##### Results ##### Results
```{r} ```{r}
...@@ -70,7 +70,7 @@ above are the results of my second line of code. I've learnt that I can put text ...@@ -70,7 +70,7 @@ above are the results of my second line of code. I've learnt that I can put text
I can present my lab notebook either chronologically or as a narrative. If I use a narrative format, I can anyway retrieve the older versions of the document on the git repository (if I've uploaded, i.e. pushed, the codes on a regular basis). I can present my lab notebook either chronologically or as a narrative. If I use a narrative format, I can anyway retrieve the older versions of the document on the git repository (if I've uploaded, i.e. pushed, the codes on a regular basis).
#### previewing the text #### previewing the text
You are currently looking at the editor, which is used to write code, etc.. To get a previous of the document neatly organized, press the 'knit' button. A new window should open with the formatted document. 'Knitting' effectively assembles the document together, and applies different formatting options that you may have set. If the document is opened in R, you are currently looking at the editor, which is used to write code, etc.. To get a previous of the document neatly organized, press the 'knit' button. A new window should open with the formatted document. 'Knitting' effectively assembles the document together, and applies different formatting options that you may have set.
#### How to format the text #### How to format the text
The text section of a R notebook is formatted using 'markdown'. You can find [cheat sheets](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) into markdown on the internet. The text section of a R notebook is formatted using 'markdown'. You can find [cheat sheets](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) into markdown on the internet.
......
...@@ -41,15 +41,16 @@ mixed models with lme4. ...@@ -41,15 +41,16 @@ mixed models with lme4.
Modern installments of R, through the graphical user interface R studio Modern installments of R, through the graphical user interface R studio
allow to keep R notebooks which combine text (and simple formatting allow to keep R notebooks which combine text (and simple formatting
rules =\> markdown), with traditional codes. This is was we are using rules =\> [markdown](https://en.wikipedia.org/wiki/Markdown)), with
now. This section is part of the text. Code examples will follow below. traditional codes. This is what we are using now. This section is part
Interestingly, R notebook can integrate code from multiple languages of the text. Code examples will follow below. Interestingly, R notebook
into one notebook (one notebook to rule them all). For instance, it can can integrate code from multiple languages into one notebook (one
run `bash` code, `python`, and of course, `r`. notebook to rule them all). For instance, it can run `bash` code,
`python`, and of course, `r`.
In this exercise, we will see how a R notebook is kept, how to do basic In this exercise, we will see how a R notebook is kept, how to do basic
text formatting, how to integrate `r` code into the document, and how to text formatting, how to integrate `r` code into the document, and how to
output this into a document that can be shared (e.g. html or pdf). output this into a document that can be shared (e.g. html, pdf, md).
Finally we will see how Rstudio integrates `git` for version control, Finally we will see how Rstudio integrates `git` for version control,
project management, and collaborative work. project management, and collaborative work.
...@@ -61,7 +62,7 @@ allows the supervisor to keep track of the progress, it also allows the ...@@ -61,7 +62,7 @@ allows the supervisor to keep track of the progress, it also allows the
student to have a track-record of previous experiments and what how student to have a track-record of previous experiments and what how
protocols and analysis evolved over time. protocols and analysis evolved over time.
The R notebook formats allows adding images to the notebook, text The R notebook format allows adding images to the notebook, text
comments, but also, code. By using git, the student ensures that the lab comments, but also, code. By using git, the student ensures that the lab
journal is archived and accessible for later use (e.g. by future journal is archived and accessible for later use (e.g. by future
students, etc..) students, etc..)
...@@ -95,7 +96,7 @@ can run the code above. A section of code within the text is known as a ...@@ -95,7 +96,7 @@ can run the code above. A section of code within the text is known as a
##### Intro ##### Intro
This is the intro to my project I seek to learn how to use R and R notebooks
##### Results ##### Results
...@@ -120,11 +121,12 @@ codes on a regular basis). ...@@ -120,11 +121,12 @@ codes on a regular basis).
#### previewing the text #### previewing the text
You are currently looking at the editor, which is used to write code, If the document is opened in R, you are currently looking at the editor,
etc.. To get a previous of the document neatly organized, press the which is used to write code, etc.. To get a previous of the document
‘knit’ button. A new window should open with the formatted document. neatly organized, press the ‘knit’ button. A new window should open with
‘Knitting’ effectively assembles the document together, and applies the formatted document. ‘Knitting’ effectively assembles the document
different formatting options that you may have set. together, and applies different formatting options that you may have
set.
#### How to format the text #### How to format the text
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment