<h4id="org09f39e6">Making R and Python available to the console</h4>
<h4id="org023804e">Making R and Python available to the console</h4>
<divclass="outline-text-4"id="text-org09f39e6">
<divclass="outline-text-4"id="text-org023804e">
<p>
<p>
When running a command, windows will look for the command in the
When running a command, Windows will look for the command in the
directories indicated in the <code>PATH</code> environment variable. If none of
directories indicated in the <code>PATH</code> environment variable. If none of
these directories contains the command, Windows will stop and indicate
these directories contains the command, Windows will stop and indicate
the command does not exist. To make sure R (, which may be in
the command does not exist. To make sure R (which may be in
something like <code>C:/Program Files/R/R-3.5.1/bin/x64/</code>) and Python (,
something like <code>C:/Program Files/R/R-3.5.1/bin/x64/</code>) and Python (which may be in something like <code>C:/Program Files/Python/Python37/</code>) can
which may be in something like <code>C:/Program Files/Python/Python37/</code>) can
easily be run from Emacs, you should thus configure the <code>PATH</code> variable
easily be run from emacs, you should thus configure the <code>PATH</code> variable
This section is illustrated in a <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Mise en place
This section is illustrated in a <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Mise en place
Emacs/Orgmode"</i> in French). Watching it before following the
Emacs/Orgmode"</i> in French). Watching it before following the
...
@@ -305,14 +311,14 @@ adding a few org-mode specific configurations.
...
@@ -305,14 +311,14 @@ adding a few org-mode specific configurations.
<h3id="orgedbc05d">Step 1: Prepare your journal</h3>
<h3id="orgd93d06a">Step 1: Prepare your journal</h3>
<divclass="outline-text-3"id="text-orgedbc05d">
<divclass="outline-text-3"id="text-orgd93d06a">
<p>
<p>
Create an <code>org/</code> directory in the top of your home:
Create an <code>org/</code> directory in the top of your home:
</p>
</p>
...
@@ -342,14 +348,14 @@ Create an <code>org/</code> directory in the top of your home:
...
@@ -342,14 +348,14 @@ Create an <code>org/</code> directory in the top of your home:
Then copy <code>rr_org/journal.org</code> file in your <code>~/org/</code> directory. This
Then copy <code>rr_org/journal.org</code> file in your <code>~/org/</code> directory. This
file will be your laboratory notebook and all the notes you will
file will be your laboratory notebook and all the notes you will
capture with <code>C-c c</code> will go automatically go in this file. The first
capture with <code>C-c c</code> will go automatically go in this file. The first
entry of this notebook is populated with <ahref="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">many emacs shortcuts</a> that you
entry of this notebook is populated with <ahref="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">many Emacs shortcuts</a> that you
<h2id="orgb88bcaf">A stub of replicable article</h2>
<h2id="orgc07c3d5">A stub of a replicable article</h2>
<divclass="outline-text-2"id="text-orgb88bcaf">
<divclass="outline-text-2"id="text-orgc07c3d5">
<p>
<p>
This section is illustrated in a <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Écrire un article
This section is illustrated in a <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Écrire un article
réplicable avec Emacs/Orgmode"</i> in French). Watching it before
réplicable avec Emacs/Orgmode"</i> in French). Watching it before
<listyle="margin-bottom:0;"><ahref="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step emacs shortcuts for our <i>reproducible research</i> configuration</a></li>
<listyle="margin-bottom:0;"><ahref="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step Emacs shortcuts for our <i>reproducible research</i> configuration</a></li>
<listyle="margin-bottom:0;"><ahref="https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">The official GNU emacs refcard</a></li>
<listyle="margin-bottom:0;"><ahref="https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">The official GNU emacs refcard</a></li>
<listyle="margin-bottom:0;">Two graphical cheat-sheats by Sacha Hua on <ahref="http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png">how to learn emacs</a> and on
<listyle="margin-bottom:0;">Two graphical cheat-sheats by Sacha Chua on <ahref="http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png">how to learn Emacs</a> and on
<ahref="http://sachachua.com/blog/wp-content/uploads/2013/08/20130830-Emacs-Newbie-How-to-Learn-Emacs-Keyboard-Shortcuts.png">how to learn emacs shortcuts</a>.</li>
<ahref="http://sachachua.com/blog/wp-content/uploads/2013/08/20130830-Emacs-Newbie-How-to-Learn-Emacs-Keyboard-Shortcuts.png">how to learn Emacs shortcuts</a>.</li>
<listyle="margin-bottom:0;"><ahref="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step org-mode shortcuts for our <i>reproducible research</i> configuration</a></li>
<listyle="margin-bottom:0;"><ahref="https://app-learninglab.inria.fr/gitlab/learning-lab/mooc-rr-ressources/blob/master/module2/ressources/rr_org/journal.org">Common and step-by-step org-mode shortcuts for our <i>reproducible research</i> configuration</a></li>
<listyle="margin-bottom:0;"><ahref="https://orgmode.org/worg/orgcard.html">The official org-mode refcard</a></li>
<listyle="margin-bottom:0;"><ahref="https://orgmode.org/worg/orgcard.html">The official org-mode refcard</a></li>
...
@@ -539,22 +545,22 @@ cheat-sheats. Here is a selection in case it helps:
...
@@ -539,22 +545,22 @@ cheat-sheats. Here is a selection in case it helps:
<ahref="https://magit.vc/">Magit</a> is an emacs interface for Git. Its usage is briefly illustrated
<ahref="https://magit.vc/">Magit</a> is an Emacs interface for Git. Its usage is briefly illustrated
in the context of this MOOC in a <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Utilisation
in the context of this MOOC in a <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/9cfc7500f0ef46d288d2317ec7b037b4">video tutorial</a> (<i>"Utilisation
Emacs/git"</i> in French).
Emacs/git"</i> in French).
</p>
</p>
<p>
<p>
It is very powerful and we use it on a daily basis but you should
It is very powerful and we use it on a daily basis but you should
definitely understand what git does behind the scene beforehand. If
definitely understand what git does behind the scenes beforehand. If
you feel this would be useful for you, you should follow <ahref="https://magit.vc/screenshots/">this visual
you feel this would be useful for you, you should follow <ahref="https://magit.vc/screenshots/">this visual
walk-through</a> or <ahref="https://www.emacswiki.org/emacs/Magit">this really short "crash course"</a>. If you installed the
walk-through</a> or <ahref="https://www.emacswiki.org/emacs/Magit">this really short "crash course"</a>. If you installed the
previous "<i>reproducible research</i>" emacs configuration, you can easily
previous "<i>reproducible research</i>" emacs configuration, you can easily
...
@@ -583,9 +589,9 @@ invoke magit by using <code>C-x g</code>.
...
@@ -583,9 +589,9 @@ invoke magit by using <code>C-x g</code>.
<listyle="margin-bottom:0;"><ahref="https://github.com/dfeich/org-babel-examples">Many examples illustrating the use of different languages in org-mode</a></li>
<listyle="margin-bottom:0;"><ahref="https://github.com/dfeich/org-babel-examples">Many examples illustrating the use of different languages in org-mode</a></li>
<h3id="org6a9f6ba">Getting your default password on GitLab (and possibly changing it)</h3>
<h3id="orgdd9a986">Getting your default password on GitLab (and possibly changing it)</h3>
<divclass="outline-text-3"id="text-org6a9f6ba">
<divclass="outline-text-3"id="text-orgdd9a986">
<p>
<p>
<b>Warning (Jupyter users) :</b> changing your default Gitlab password will prevent you from committing in Jupyter. You will have to do the extra step of changing your Jupyter <code>~/.git-credentials</code>
<b>Warning (Jupyter users) :</b> changing your default Gitlab password will
prevent you from committing in Jupyter. You will have to do the extra
step of changing your <code>~/.git-credentials</code> in the Jupyter environment
(possibly several times).
</p>
</p>
<olclass="org-ol">
<olclass="org-ol">
...
@@ -224,13 +227,13 @@ button).
...
@@ -224,13 +227,13 @@ button).
</div>
</div>
</div></li>
</div></li>
<listyle="margin-bottom:0;"><p>
<listyle="margin-bottom:0;"><p>
If you wish to modify your password, you shoul go to <code>Account > Settings > Password</code>
If you wish to modify your password, you should go to <code>Account > Settings > Password</code>
and define your password using the default
and define your password using the default
password you just retrieved. Again, if you use the Jupyter
password you just retrieved. Again, if you use the Jupyter
notebooks we have deployed for the MOOC, remember that changing
notebooks we have deployed for the MOOC, remember that changing
your default Gitlab password will prevent you from committing in
your default Gitlab password will prevent you from committing in
Jupyter. You will have to do the extra step of changing your
Jupyter. You will have to do the extra step of changing your
Jupyter <code>~/.git-credentials</code> through a jupyter console (see next
Jupyter <code>~/.git-credentials</code> through a Jupyter console (see next
<h2id="orga30368c">1. Jupyter Tips and tricks</h2>
<h2id="org0b4fddb">1. Jupyter tips and tricks</h2>
<divclass="outline-text-2"id="text-orga30368c">
<divclass="outline-text-2"id="text-org0b4fddb">
<p>
<p>
The following <ahref="https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/">webpage</a> lists several Jupyter tricks (in particular, it
The following <ahref="https://www.dataquest.io/blog/jupyter-notebook-tips-tricks-shortcuts/">webpage</a> lists several Jupyter tricks (in particular, it
illustrates many <code>Ipython magic</code> commands) that should improve your
illustrates many <code>IPython magic</code> commands) that should improve your
efficiency (note that this blog post is about two years old so some of
efficiency (note that this blog post is about two years old so some of
the tricks may have been integrated in the default behavior of Jupyter
the tricks may have been integrated in the default behavior of Jupyter
For any reason, you may be unsatisfied with the use of R or of
Jupyter is not limited to Pytyhon and R. Many other languages are available:
Python. Many other languages are available:
<ahref="https://github.com/jupyter/jupyter/wiki/Jupyter-kernels">https://github.com/jupyter/jupyter/wiki/Jupyter-kernels</a>, including
<ahref="https://github.com/jupyter/jupyter/wiki/Jupyter-kernels">https://github.com/jupyter/jupyter/wiki/Jupyter-kernels</a>, including
non-free languages like SAS, Mathematica, Matlab…
non-free languages like SAS, Mathematica, Matlab… Note that the maturity of these kernels differs widely.
</p>
</p>
<p>
<p>
None of these other languages have been deployed in the context of our
None of these other languages have been deployed in the context of our
MOOC but you may want to read the next sections to know more about how
MOOC but you may want to read the next sections to learn how
to set up your own Jupyter notebooks on your computer and benefit from these
to set up your own Jupyter on your computer and benefit from these extensions.
extensions.
</p>
<p>
Since the question was asked several times, if you really need to stay
with SAS, you should know that SAS can be used within Jupyter using
either the <ahref="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the <ahref="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step
explanations about this are given <ahref="https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_jupyter_windows/tuto_jupyter_windows.md">here</a>).
</p>
<p>
Since proprietary software such as SAS cannot easily be inspected, we discourage its use as it hinders reproducibility by
essence. But perfection does not exist anyway and using Jupyter
literate programming approach allied with systematic control version
and environment control will certainly help anyway.
<h2id="org71d8232">2. Installing and configuring Jupyter on your computer</h2>
<divclass="outline-text-2"id="text-org71d8232">
<p>
<p>
In this Section, we provide information on how to set up on your own
In this section, we explain how to set up a Jupyter environment on
computer a Jupyter environment similar to the one deployed for this
your own computer similar to the one deployed for this MOOC.
MOOC.
</p>
</p>
<p>
<p>
...
@@ -117,15 +127,13 @@ Note that Jupyter notebooks are only a small part of the picture and
...
@@ -117,15 +127,13 @@ Note that Jupyter notebooks are only a small part of the picture and
that Jupyter is now part of a bigger project: <ahref="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a>, which allows
that Jupyter is now part of a bigger project: <ahref="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a>, which allows
you to mix various components (including notebooks) in your
you to mix various components (including notebooks) in your
browser. In the context of this MOOC, our time frame was too short to
browser. In the context of this MOOC, our time frame was too short to
benefit from JupyterLab which was still under active development but
benefit from JupyterLab which was still under active development. You may, however, prefer JupyterLab when doing an installation on your own computer.
this is probably the best option now if you want to benefit from
<h4id="org913ba64">• Interacting with GitLab and GitHub</h4>
<h4id="org3ec1745">• Interacting with GitLab and GitHub</h4>
<divclass="outline-text-4"id="text-org913ba64">
<divclass="outline-text-4"id="text-org3ec1745">
<p>
<p>
To ease your experience, we added some pull/push buttons that allow
To ease your experience, we added pull/push buttons that allow
you to commit and sync with GitLab. This development was specific to
you to commit and sync with GitLab. This development was specific to
the MOOC but inspired from a previous <ahref="https://github.com/Lab41/sunny-side-up">proof of concept</a>. We have
the MOOC but inspired from a previous <ahref="https://github.com/Lab41/sunny-side-up">proof of concept</a>. We have
recently discovered that someone else developed about at the same time
recently discovered that someone else developed about at the same time
...
@@ -358,38 +363,7 @@ is a long an interesting discussion about various options on
...
@@ -358,38 +363,7 @@ is a long an interesting discussion about various options on
</p>
</p>
<p>
<p>
Last but not least, remember that Jupyter notebooks are only a small
For those who use <ahref="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a> rather than the plain Jupyter, a specific <ahref="https://github.com/jupyterlab/jupyterlab-git">JupyterLab git plugin</a> has been developed to offer a nice version control experience.
part of the picture and that Jupyter is now part of a bigger project:
<ahref="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a>, which allows you to mix various components (including
notebooks) in your browser. A specific <ahref="https://github.com/jupyterlab/jupyterlab-git">JupyterLab git plugin</a> has been
developed to offer a nice version control experience.
<h4id="orgb3e3b0d">• Using other languages (e.g., SAS, Matlab, Mathematica, etc.)</h4>
<divclass="outline-text-4"id="text-orgb3e3b0d">
<p>
For any reason, you may be unsatisfied with the use of R or of
Python. Many other languages are available:
<ahref="https://github.com/jupyter/jupyter/wiki/Jupyter-kernels">https://github.com/jupyter/jupyter/wiki/Jupyter-kernels</a>, including
non-free languages like SAS, Mathematica, Matlab…
</p>
<p>
Since the question was asked several times, if you really need to stay
with SAS, you should know that SAS can be used within Jupyter using
either the <ahref="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the <ahref="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step
explanations about this are given <ahref="https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_jupyter_windows/tuto_jupyter_windows.md">here</a>).
</p>
<p>
Since such software cannot easily be opened for inspection not widely
used, we discourage this approach as it hinders reproducibility by
essence. But perfection does not exist anyway and using Jupyter
literate programming approach allied with systematic control version
and environment control will certainly help anyway.
<listyle="margin-bottom:0;"><ahref="#orgf1348bc">Using Git from RStudio</a>
<ulstyle="margin:0 0;">
<ulstyle="margin:0 0;">
<listyle="margin-bottom:0;"><ahref="#org1cab696">Cloning a repository</a></li>
<listyle="margin-bottom:0;"><ahref="#org2aec51e">Cloning a repository</a></li>
<listyle="margin-bottom:0;"><ahref="#org1707e53">Modifying a file</a></li>
<listyle="margin-bottom:0;"><ahref="#orga7c1559">Modifying a file</a></li>
</ul>
</ul>
</li>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
<p>
This document provides information on how to install Rstudio.
</p>
<p>
If you have never used git with Rstudio, <b>we strongly advise that you
follow <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/d132a854b0464ad29085cedaded23136">our tutorial on using git from Rstudio</a></b> (<i>"Rstudio et Gitlab"</i> in French). Before
proceeding, make sure you also have followed the <b><ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/7508aece244548349424dfd61ee3ba85">"git/GitLab
configuration" tutorial</a></b> (in French).
</p>
<p>
Alternatively, you may want to watch <ahref="https://www.youtube.com/embed/uHYcDQDbMY8">this video</a> (in English). If you
do not like videos, you should have a look at the <ahref="https://swcarpentry.github.io/git-novice/14-supplemental-rstudio/index.html">step-by-step
explanations from Software Carpentry</a>. It comes with many screenshots
and is quite progressive.
</p>
<p>
Last, you should know that the Rstudio team has created a lot of very
good material and tutorials. You should definitively look at the <ahref="https://www.rstudio.com/resources/cheatsheets/">Cheat
sheets webpage</a>. In particular you may want to have look at the
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf">R Markdown</a> (here is also a <ahref="https://rmarkdown.rstudio.com/">nice step-by-step presentation of Rmarkdown</a>),</li>
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/data-visualization-2.1.pdf">Data visualization with ggplot2</a>,</li>
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/data-transformation.pdf">Data transformation with dplyr</a></li>
</ul>
<p>
In case it helps, here are some (sometimes outdated) French versions
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/translations/french/ggplot2-french-cheatsheet.pdf">Visualisation de données avec ggplot2</a></li>
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/translations/french/data-wrangling-french.pdf">Transformation de données avec dplyr</a></li>
<listyle="margin-bottom:0;"><ahref="https://www.fun-mooc.fr/c4x/UPSUD/42001S02/asset/RMarkdown.pdf">Un court document sur R Markdown</a></li>
Some instructions on installing R and knitr must be missing. This
Some instructions on installing R and knitr must be missing. This
...
@@ -160,9 +119,9 @@ should be tested and improved.
...
@@ -160,9 +119,9 @@ should be tested and improved.
</blockquote>
</blockquote>
<ulclass="org-ul">
<ulclass="org-ul">
<listyle="margin-bottom:0;">Download and install R from the <ahref="https://cran.r-project.org/">CRAN webpage</a> by choosing the right operating system.</li>
<listyle="margin-bottom:0;">Download and install R from the <ahref="https://cran.r-project.org/">CRAN webpage</a> by choosing the right operating system.</li>
<listyle="margin-bottom:0;">Download and install Rstudio from the <ahref="https://www.rstudio.com/products/rstudio/download/#download">Rstudio webpage</a> by choosing the right operating system.</li>
<listyle="margin-bottom:0;">Download and install RStudio from the <ahref="https://www.rstudio.com/products/rstudio/download/#download">RStudio webpage</a> by choosing the right operating system.</li>
<listyle="margin-bottom:0;">Download and install MiKTeX from the <ahref="https://miktex.org/download">MiKTeX webpage</a> by choosing the right operating system. You will be prompted to install some specific packages when exporting to pdf.</li>
<listyle="margin-bottom:0;">Download and install MiKTeX from the <ahref="https://miktex.org/download">MiKTeX webpage</a> by choosing the right operating system. You will be prompted to install some specific packages when exporting to pdf.</li>
<listyle="margin-bottom:0;">Open Rstudio and type the following commands in the console to install <code>knitr</code> and <code>ggplot2</code>:</li>
<listyle="margin-bottom:0;">Open RStudio and type the following commands in the console to install <code>knitr</code> and <code>ggplot2</code>:</li>
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf">R Markdown</a> (here is also a <ahref="https://rmarkdown.rstudio.com/">nice step-by-step presentation of Rmarkdown</a>),</li>
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/data-visualization-2.1.pdf">Data visualization with ggplot2</a>,</li>
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/data-transformation.pdf">Data transformation with dplyr</a></li>
</ul>
<p>
In case it helps, here are some (sometimes outdated) French versions
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/translations/french/ggplot2-french-cheatsheet.pdf">Visualisation de données avec ggplot2</a></li>
<listyle="margin-bottom:0;"><ahref="https://github.com/rstudio/cheatsheets/raw/master/translations/french/data-wrangling-french.pdf">Transformation de données avec dplyr</a></li>
<listyle="margin-bottom:0;"><ahref="https://www.fun-mooc.fr/c4x/UPSUD/42001S02/asset/RMarkdown.pdf">Un court document sur R Markdown</a></li>
If you have never used git with RStudio, <b>we strongly advise that you
follow <ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/d132a854b0464ad29085cedaded23136">our tutorial on using git from RStudio</a></b> (<i>"RStudio et Gitlab"</i>
in French). Before proceeding, make sure you also have followed the
<b><ahref="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/jump_to_id/7508aece244548349424dfd61ee3ba85">"git/GitLab configuration" tutorial</a></b> (in French).
</p>
<p>
Alternatively, you may want to watch <ahref="https://www.youtube.com/embed/uHYcDQDbMY8">this video</a> (in English). If you
do not like videos, you should have a look at the <ahref="https://swcarpentry.github.io/git-novice/14-supplemental-rstudio/index.html">step-by-step
explanations from Software Carpentry</a>. It comes with many screenshots
<h3id="org8d7f266">"Thoughts" on language/software stability</h3>
<h3id="org6dd38af">"Thoughts" on language/software stability</h3>
<divclass="outline-text-3"id="text-org8d7f266">
<divclass="outline-text-3"id="text-org6dd38af">
<p>
<p>
As we explained, the programming language used in an analysis has a
As we explained, the programming language used in an analysis has a
clear influence on the reproducibility of your analysis. It is not a
clear influence on the reproducibility of your analysis. It is not a
...
@@ -56,12 +56,12 @@ committee</a> (even though some compilers may not respect this norm).
...
@@ -56,12 +56,12 @@ committee</a> (even though some compilers may not respect this norm).
<p>
<p>
On the other end of the spectrum, <ahref="https://en.wikipedia.org/wiki/Python_(programming_language)">Python</a> had a much more organic
On the other end of the spectrum, <ahref="https://en.wikipedia.org/wiki/Python_(programming_language)">Python</a> had a much more organic
development based on a readability philosophy and has evolved with
development based on a readability philosophy and valuing continuous
time. Furthermore, python is commonly used as a wrapping language
improvement over backwards-compatibility. Furthermore, Python is
(e.g., to easily use C or FORTRAN libraries) and has its own packaging
commonly used as a wrapping language (e.g., to easily use C or FORTRAN
system to make everyone's life easier. All these design choices tend
libraries) and has its own packaging system. All these design choices
to make reproducibility often a bit painful with python, even though
tend to make reproducibility often a bit painful with Python, even
the community is slowly taking this into account.
though the community is slowly taking this into account. The transition from Python 2 to the not fully backwards compatible Python 3 has been a particularly painful process, not least because the two languages are so similar that is it not always easy to figure out if a given script or module is written in Python 2 or Python 3. It isn't even rare to see Python scripts that work under both Python 2 and Python 3, but produce different results due to the change in the behavior of integer division.
</p>
</p>
<p>
<p>
...
@@ -72,32 +72,32 @@ solid/stable. R is obviously not immune to evolutions that break old
...
@@ -72,32 +72,32 @@ solid/stable. R is obviously not immune to evolutions that break old
versions and hinder reproducibility/backward compatibility. Here is a
versions and hinder reproducibility/backward compatibility. Here is a
relatively recent <ahref="http://members.cbio.mines-paristech.fr/~thocking/HOCKING-reproducible-research-with-R.html">true story about this</a> and some colleagues who worked
relatively recent <ahref="http://members.cbio.mines-paristech.fr/~thocking/HOCKING-reproducible-research-with-R.html">true story about this</a> and some colleagues who worked
on the <ahref="https://www.fun-mooc.fr/courses/UPSUD/42001S06/session06/about">statistics introductory course with R on FUN</a> reported us
on the <ahref="https://www.fun-mooc.fr/courses/UPSUD/42001S06/session06/about">statistics introductory course with R on FUN</a> reported us
several issues with functions from a few functions (<code>plotmeans</code> from
several issues with a few functions (<code>plotmeans</code> from <code>gplots</code>,
<code>gplots</code>, <code>survfit</code> from <code>survival</code>, or <code>hclust</code>) whose default
<code>survfit</code> from <code>survival</code>, or <code>hclust</code>) whose default parameters had
parameters had changed over the years. It is thus probably a good
changed over the years. It is thus probably good practice to give
practice to explicitly indicate in your code default values (, which
explicit values for all parameters (which can be cumbersome) instead
can be cumbersome) and to restrict your dependencies as much as
of relying on default values, and to restrict your dependencies as much
possible.
as possible.
</p>
</p>
<p>
<p>
This being said, the R development community is generally quite
This being said, the R development community is generally quite
careful about stability. We (the authors of this MOOC) think open
careful about stability. We (the authors of this MOOC) believe that open
source (, which allows to inspect how computation is done and to
source (which allows to inspect how computation is done and to
identify both mistakes and sources of nonreproducibility) is more
identify both mistakes and sources of non-reproducibility) is more
important than the rock solid stability of SAS, which is a proprietary
important than the rock solid stability of SAS, which is proprietary
software. Yet, if you really need to stay with SAS (similar solutions
software. Yet, if you really need to stay with SAS (similar solutions
probably exist for other languages as well), you should know that SAS
probably exist for other languages as well), you should know that SAS
can be used within Jupyter using either the <ahref="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the
can be used within Jupyter using either the <ahref="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the
<ahref="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step explanations about this are given
<ahref="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step explanations about this are given
<ahref="https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_jupyter_windows/tuto_jupyter_windows.md">here</a>). Using such literate programming approach allied with systematic
<ahref="https://app-learninglab.inria.fr/gitlab/85bc36e0a8096c618fbd5993d1cca191/mooc-rr/blob/master/documents/tuto_jupyter_windows/tuto_jupyter_windows.md">here</a>). Using such literate programming approach allied with systematic
control version and environment control will help anyway.
<h3id="org888785f">Controlling your software environment</h3>
<h3id="orgdcd752c">Controlling your software environment</h3>
<divclass="outline-text-3"id="text-org888785f">
<divclass="outline-text-3"id="text-orgdcd752c">
<p>
<p>
As we mentioned in the video sequences, there are several solutions to
As we mentioned in the video sequences, there are several solutions to
control your environment:
control your environment:
...
@@ -108,8 +108,8 @@ control your environment:
...
@@ -108,8 +108,8 @@ control your environment:
clean environment and install only what's strictly necessary (and document it):
clean environment and install only what's strictly necessary (and document it):
<ulclass="org-ul">
<ulclass="org-ul">
<listyle="margin-bottom:0;">The very well known <ahref="https://www.docker.io/">Docker</a></li>
<listyle="margin-bottom:0;">The very well known <ahref="https://www.docker.io/">Docker</a></li>
<listyle="margin-bottom:0;"><ahref="https://singularity.lbl.gov/">Singularity</a> or <ahref="https://spack.io/">Spack</a>, which are more targeted toward high
<listyle="margin-bottom:0;"><ahref="https://singularity.lbl.gov/">Singularity</a> or <ahref="https://spack.io/">Spack</a>, which are more targeted toward the specific
performance computing users that have specific needs</li>
needs of high performance computing users</li>
<listyle="margin-bottom:0;"><ahref="https://www.gnu.org/software/guix/">Guix</a>, <ahref="https://nixos.org/">Nix</a> that are very clean (perfect?) solutions to this
<listyle="margin-bottom:0;"><ahref="https://www.gnu.org/software/guix/">Guix</a>, <ahref="https://nixos.org/">Nix</a> that are very clean (perfect?) solutions to this
dependency hell and which we recommend</li>
dependency hell and which we recommend</li>
</ul></li>
</ul></li>
...
@@ -133,9 +133,9 @@ Hinsen on Active Papers</a> (<a href="http://www.activepapers.org/">http://www.a
...
@@ -133,9 +133,9 @@ Hinsen on Active Papers</a> (<a href="http://www.activepapers.org/">http://www.a
You may want to have a look at the following two webinars:
You may want to have a look at the following two webinars:
</p>
</p>
<ulclass="org-ul">
<ulclass="org-ul">
<listyle="margin-bottom:0;"><ahref="https://github.com/alegrand/RR_webinars/blob/master/8_artifact_evaluation/index.org">Enabling open and reproducible research at computer systems’
<listyle="margin-bottom:0;"><ahref="https://github.com/alegrand/RR_webinars/blob/master/8_artifact_evaluation/index.org">Enabling open and reproducible research at computer systems’
conferences (by Grigori Fursin)</a>. In particular, this talk discusses
conferences (by Grigori Fursin)</a>. In particular, this talk discusses
<i>artifact evaluation</i> that are becoming more and more popular.</li>
<i>artifact evaluation</i> that is becoming more and more popular.</li>
<listyle="margin-bottom:0;"><ahref="https://github.com/alegrand/RR_webinars/blob/master/7_publications/index.org">Publication Modes Favoring Reproducible Research (by Konrad Hinsen
<listyle="margin-bottom:0;"><ahref="https://github.com/alegrand/RR_webinars/blob/master/7_publications/index.org">Publication Modes Favoring Reproducible Research (by Konrad Hinsen
and Nicolas Rougier)</a>. In this talk, the motivation for the <ahref="http://rescience.github.io/">ReScience
and Nicolas Rougier)</a>. In this talk, the motivation for the <ahref="http://rescience.github.io/">ReScience
<h4id="org606d1d6">Getting the list of installed packages and their version</h4>
<h4id="org546bbcf">Getting the list of installed packages and their version</h4>
<divclass="outline-text-4"id="text-org606d1d6">
<divclass="outline-text-4"id="text-org546bbcf">
<p>
<p>
This topic is discussed on <ahref="https://stackoverflow.com/questions/20180543/how-to-check-version-of-python-modules">StackOverflow</a>. When using <code>pip</code> (the Python
This topic is discussed on <ahref="https://stackoverflow.com/questions/20180543/how-to-check-version-of-python-modules">StackOverflow</a>. When using <code>pip</code> (the Python
package installer) within a shell command, it is easy to query the
package installer) within a shell command, it is easy to query the
...
@@ -343,7 +343,7 @@ versions of Python are available on your machine
...
@@ -343,7 +343,7 @@ versions of Python are available on your machine
</p>
</p>
<p>
<p>
Here for example how I get these information on my machine:
Here is for example how I get this information on my machine:
<h4id="orga08b912">Installing a new package or a specific version</h4>
<h4id="org1110f15">Installing a new package or a specific version</h4>
<divclass="outline-text-4"id="text-orga08b912">
<divclass="outline-text-4"id="text-org1110f15">
<p>
<p>
This section is mostly a cut and paste from the <ahref="https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages">recent post by Ian
This section is mostly a cut and paste from the <ahref="https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages">recent post by Ian
Pylvainen</a> on this topic. It comprises a very clear explanation on how
Pylvainen</a> on this topic. It comprises a very clear explanation of how
to proceed.
to proceed.
</p>
</p>
</div>
</div>
<ulclass="org-ul">
<ulclass="org-ul">
<listyle="margin-bottom:0;"><aid="org5abc570"></a>Installing a pre-compiled version<br/>
<listyle="margin-bottom:0;"><aid="orgdf03a57"></a>Installing a pre-compiled version<br/>
<divclass="outline-text-5"id="text-org5abc570">
<divclass="outline-text-5"id="text-orgdf03a57">
<p>
<p>
If you're on a Debian or a Ubuntu system, it may be difficult to
If you're on a Debian or a Ubuntu system, it may be difficult to
access a specific version without breaking your system. So unless you
access a specific version without breaking your system. So unless you