Commit 57c09f88 authored by Arnaud Legrand's avatar Arnaud Legrand

Regenerate HTML files (to propagate in FUN).

parent b013af5f
......@@ -4,46 +4,47 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org886dc6c">Installing emacs, org-mode, ess, and auctex.</a>
<li style="margin-bottom:0;"><a href="#org0620a23">Installing emacs, org-mode, ess, and auctex.</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org33170b6">Linux (Debian, Ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#orga368aae">macOS</a></li>
<li style="margin-bottom:0;"><a href="#orgbd810a7">Windows</a>
<li style="margin-bottom:0;"><a href="#org3c63e2d">Linux (Debian, Ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#orgd341044">macOS</a></li>
<li style="margin-bottom:0;"><a href="#org9f08150">Windows</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org2a1e237">Directory naming conventions</a></li>
<li style="margin-bottom:0;"><a href="#org09f39e6">Making R and Python available to the console</a></li>
<li style="margin-bottom:0;"><a href="#org5d1dfdc">Installing and configuring Matplotlib (graphic python library)</a></li>
<li style="margin-bottom:0;"><a href="#org627e96b">Directory naming conventions</a></li>
<li style="margin-bottom:0;"><a href="#org023804e">Making R and Python available to the console</a></li>
<li style="margin-bottom:0;"><a href="#org89abfd4">Installing and configuring Matplotlib (graphic python library)</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org88182bc">All platforms: pretty code in HTML export</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgabdfcf5">A simple "<i>reproducible research</i>" emacs configuration</a>
<li style="margin-bottom:0;"><a href="#org82a9da6">A simple "<i>reproducible research</i>" emacs configuration</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org83bdf4d">Step 0: Backup and download our configuration</a></li>
<li style="margin-bottom:0;"><a href="#orgedbc05d">Step 1: Prepare your journal</a></li>
<li style="margin-bottom:0;"><a href="#org2d3412e">Step 2: Set up Emacs configuration</a></li>
<li style="margin-bottom:0;"><a href="#orgf8c57a2">Step 3: Adapt the configuration to your specific needs if required</a></li>
<li style="margin-bottom:0;"><a href="#orgcd0dd6a">Step 4: Check whether the installation is working or not</a></li>
<li style="margin-bottom:0;"><a href="#org7a25e13">Step 5: Open and play with your journal:</a></li>
<li style="margin-bottom:0;"><a href="#orge1f5003">Step 0: Backup and download our configuration</a></li>
<li style="margin-bottom:0;"><a href="#orgd93d06a">Step 1: Prepare your journal</a></li>
<li style="margin-bottom:0;"><a href="#orgc8799c3">Step 2: Set up Emacs configuration</a></li>
<li style="margin-bottom:0;"><a href="#org3a69cf6">Step 3: Adapt the configuration to your specific needs if required</a></li>
<li style="margin-bottom:0;"><a href="#org6e757d6">Step 4: Check whether the installation is working or not</a></li>
<li style="margin-bottom:0;"><a href="#org7b5b368">Step 5: Open and play with your journal:</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgb88bcaf">A stub of replicable article</a></li>
<li style="margin-bottom:0;"><a href="#org01b2658">Emacs Tips and tricks</a>
<li style="margin-bottom:0;"><a href="#orgc07c3d5">A stub of a replicable article</a></li>
<li style="margin-bottom:0;"><a href="#org307cdb9">Emacs tips and tricks</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgd56b777">Cheat-sheets</a>
<li style="margin-bottom:0;"><a href="#orgd5d3ba1">Cheat-sheets</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orge166ddb">Emacs</a></li>
<li style="margin-bottom:0;"><a href="#org408f38a">Org-mode</a></li>
<li style="margin-bottom:0;"><a href="#org9ae5f18">Emacs</a></li>
<li style="margin-bottom:0;"><a href="#org6571d83">Org-mode</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org0d09525">Video tutorials</a></li>
<li style="margin-bottom:0;"><a href="#org5254050">Additional useful emacs packages</a>
<li style="margin-bottom:0;"><a href="#orgde8cbd9">Video tutorials</a></li>
<li style="margin-bottom:0;"><a href="#orgcc0edda">Additional useful emacs packages</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgb7773c1">Company-mode</a></li>
<li style="margin-bottom:0;"><a href="#org700813f">Magit</a></li>
<li style="margin-bottom:0;"><a href="#org3b26a95">Company-mode</a></li>
<li style="margin-bottom:0;"><a href="#org7fcac5c">Magit</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org5e0e6f3">Other resources</a></li>
<li style="margin-bottom:0;"><a href="#orgc6ce93f">Other resources</a></li>
</ul>
</li>
</ul>
......@@ -64,15 +65,15 @@ the <a href="https://www.fun-mooc.fr/courses/course-v1:inria+41016+session01bis/
The next section provides information on how to install emacs.
</p>
<div id="outline-container-org886dc6c" class="outline-2">
<h2 id="org886dc6c">Installing emacs, org-mode, ess, and auctex.</h2>
<div class="outline-text-2" id="text-org886dc6c">
<div id="outline-container-org0620a23" class="outline-2">
<h2 id="org0620a23">Installing emacs, org-mode, ess, and auctex.</h2>
<div class="outline-text-2" id="text-org0620a23">
</div>
<div id="outline-container-org33170b6" class="outline-3">
<h3 id="org33170b6">Linux (Debian, Ubuntu)</h3>
<div class="outline-text-3" id="text-org33170b6">
<div id="outline-container-org3c63e2d" class="outline-3">
<h3 id="org3c63e2d">Linux (Debian, Ubuntu)</h3>
<div class="outline-text-3" id="text-org3c63e2d">
<p>
We provide here only instructions for debian-based distributions. Feel
We provide here only instructions for Debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g.n redhat, fedora).
</p>
......@@ -132,9 +133,9 @@ which is now deprecated.
</p>
</div>
</div>
<div id="outline-container-orga368aae" class="outline-3">
<h3 id="orga368aae">macOS</h3>
<div class="outline-text-3" id="text-orga368aae">
<div id="outline-container-orgd341044" class="outline-3">
<h3 id="orgd341044">macOS</h3>
<div class="outline-text-3" id="text-orgd341044">
<p>
<b>Note:</b> macOS comes with a prehistoric command-line-only version of Emacs located at <code>/usr/bin/emacs</code>. It's best to forget about it.
</p>
......@@ -189,9 +190,9 @@ in order to make Emacs accessible directly from <code>/Applications</code>.
</ul>
</div>
</div>
<div id="outline-container-orgbd810a7" class="outline-3">
<h3 id="orgbd810a7">Windows</h3>
<div class="outline-text-3" id="text-orgbd810a7">
<div id="outline-container-org9f08150" class="outline-3">
<h3 id="org9f08150">Windows</h3>
<div class="outline-text-3" id="text-org9f08150">
<p>
Install the <code>.exe</code> file from <a href="http://vgoulet.act.ulaval.ca/">Vincent Goulet</a>:
<a href="https://vigou3.github.io/emacs-modified-windows/">https://vigou3.github.io/emacs-modified-windows/</a>. It ships with recent
......@@ -202,21 +203,13 @@ versions:
<li style="margin-bottom:0;">Org-mode 9.1.13</li>
<li style="margin-bottom:0;">ESS 17.11</li>
</ul>
<p>
To have code pretty printing when exporting to html, it appears like
you should install the <code>htmlize</code> package, which is done by opening emacs
and typing the following command:
</p>
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="example">
M-x package-install RET htmlize RET # where M-x means pressing the "Esc" key then the "x" key
</pre>
</div>
<div id="outline-container-org2a1e237" class="outline-4">
<h4 id="org2a1e237">Directory naming conventions</h4>
<div class="outline-text-4" id="text-org2a1e237">
<div id="outline-container-org627e96b" class="outline-4">
<h4 id="org627e96b">Directory naming conventions</h4>
<div class="outline-text-4" id="text-org627e96b">
<p>
In all the following instructions, it is common to refer to your home
In the following instructions, we refer to your home
directory through the (UNIX) <code>~/</code> notation. On Windows, your home
directory should be something like <code>C:\Users\yourname</code>. Therefore,
whenever we mention the <code>~/org/</code> (resp. the <code>~/.emacs.d/</code>) directory this
......@@ -225,17 +218,16 @@ means we are referring to <code>C:\Users\yourname\org</code> (resp.
</p>
</div>
</div>
<div id="outline-container-org09f39e6" class="outline-4">
<h4 id="org09f39e6">Making R and Python available to the console</h4>
<div class="outline-text-4" id="text-org09f39e6">
<div id="outline-container-org023804e" class="outline-4">
<h4 id="org023804e">Making R and Python available to the console</h4>
<div class="outline-text-4" id="text-org023804e">
<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
these directories contains the command, Windows will stop and indicate
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 (,
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
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 (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
accordingly.
</p>
......@@ -245,9 +237,9 @@ explained <a href="http://sametmax.com/ajouter-un-chemin-a-la-variable-denvironn
</p>
</div>
</div>
<div id="outline-container-org5d1dfdc" class="outline-4">
<h4 id="org5d1dfdc">Installing and configuring Matplotlib (graphic python library)</h4>
<div class="outline-text-4" id="text-org5d1dfdc">
<div id="outline-container-org89abfd4" class="outline-4">
<h4 id="org89abfd4">Installing and configuring Matplotlib (graphic python library)</h4>
<div class="outline-text-4" id="text-org89abfd4">
<p>
Open an DOS console and type the following command:
</p>
......@@ -282,11 +274,25 @@ starting with <code>backend</code>, which amounts to use the default <code>Agg</
</div>
</div>
</div>
<div id="outline-container-org88182bc" class="outline-3">
<h3 id="org88182bc">All platforms: pretty code in HTML export</h3>
<div class="outline-text-3" id="text-org88182bc">
<p>
To have code pretty printing when exporting to HTML, you should
install the <code>htmlize</code> package, which is done by opening emacs and
typing the following command:
</p>
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="example">
M-x package-install RET htmlize RET # where M-x means pressing the "Esc" key then the "x" key
</pre>
</div>
</div>
</div>
<div id="outline-container-orgabdfcf5" class="outline-2">
<h2 id="orgabdfcf5">A simple "<i>reproducible research</i>" emacs configuration</h2>
<div class="outline-text-2" id="text-orgabdfcf5">
<div id="outline-container-org82a9da6" class="outline-2">
<h2 id="org82a9da6">A simple "<i>reproducible research</i>" emacs configuration</h2>
<div class="outline-text-2" id="text-org82a9da6">
<p>
This section is illustrated in a <a href="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
......@@ -305,14 +311,14 @@ adding a few org-mode specific configurations.
</p>
</div>
<div id="outline-container-org83bdf4d" class="outline-3">
<h3 id="org83bdf4d">Step 0: Backup and download our configuration</h3>
<div class="outline-text-3" id="text-org83bdf4d">
<div id="outline-container-orge1f5003" class="outline-3">
<h3 id="orge1f5003">Step 0: Backup and download our configuration</h3>
<div class="outline-text-3" id="text-orge1f5003">
<p>
The procedure we propose will wipe your already existing custom emacs
configuration if you already have one. <b>You should thus beforehand make
a backup of <code>~/.emacs</code> and of <code>~/.emacs.d/init.el</code></b> (if these file
exists).
The procedure we propose will wipe your already existing custom Emacs
configuration if you have one. <b>You should thus beforehand make
a backup of <code>~/.emacs</code> and of <code>~/.emacs.d/init.el</code></b> (if these files
exist).
</p>
<p>
......@@ -328,9 +334,9 @@ rr_org/journal.org
</div>
</div>
<div id="outline-container-orgedbc05d" class="outline-3">
<h3 id="orgedbc05d">Step 1: Prepare your journal</h3>
<div class="outline-text-3" id="text-orgedbc05d">
<div id="outline-container-orgd93d06a" class="outline-3">
<h3 id="orgd93d06a">Step 1: Prepare your journal</h3>
<div class="outline-text-3" id="text-orgd93d06a">
<p>
Create an <code>org/</code> directory in the top of your home:
</p>
......@@ -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
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
entry of this notebook is populated with <a href="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 <a href="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
should give a try.
</p>
</div>
</div>
<div id="outline-container-org2d3412e" class="outline-3">
<h3 id="org2d3412e">Step 2: Set up Emacs configuration</h3>
<div class="outline-text-3" id="text-org2d3412e">
<div id="outline-container-orgc8799c3" class="outline-3">
<h3 id="orgc8799c3">Step 2: Set up Emacs configuration</h3>
<div class="outline-text-3" id="text-orgc8799c3">
<p>
Copy <code>rr_org/init.el</code> in your <code>~/.emacs.d/</code> directory.
</p>
......@@ -361,9 +367,9 @@ configuration with the following command: <code>emacs -q -l rr_org/init.el</code
</p>
</div>
</div>
<div id="outline-container-orgf8c57a2" class="outline-3">
<h3 id="orgf8c57a2">Step 3: Adapt the configuration to your specific needs if required</h3>
<div class="outline-text-3" id="text-orgf8c57a2">
<div id="outline-container-org3a69cf6" class="outline-3">
<h3 id="org3a69cf6">Step 3: Adapt the configuration to your specific needs if required</h3>
<div class="outline-text-3" id="text-org3a69cf6">
<p>
There are two situations in which it might be necessary to modify
<code>init.el</code>:
......@@ -392,9 +398,9 @@ beginning of the file for instructions.
</p>
</div>
</div>
<div id="outline-container-orgcd0dd6a" class="outline-3">
<h3 id="orgcd0dd6a">Step 4: Check whether the installation is working or not</h3>
<div class="outline-text-3" id="text-orgcd0dd6a">
<div id="outline-container-org6e757d6" class="outline-3">
<h3 id="org6e757d6">Step 4: Check whether the installation is working or not</h3>
<div class="outline-text-3" id="text-org6e757d6">
<p>
Open a new instance of Emacs and open a <code>foo.org</code> file. Copy the
following lines in this file:
......@@ -425,22 +431,22 @@ is demonstrated in the <a href="https://app-learninglab.inria.fr/gitlab/learning
</p>
</div>
</div>
<div id="outline-container-org7a25e13" class="outline-3">
<h3 id="org7a25e13">Step 5: Open and play with your journal:</h3>
<div class="outline-text-3" id="text-org7a25e13">
<div id="outline-container-org7b5b368" class="outline-3">
<h3 id="org7b5b368">Step 5: Open and play with your journal:</h3>
<div class="outline-text-3" id="text-org7b5b368">
<p>
In step 1, you were told to create an journal in
<code>~org/journal.org</code>. First you probably want to make sure this file is
backed up in a revision control system like git. We leave it up to you
stored in a version control system like git. We leave it up to you
to set this up but if you have any trouble, feel free to ask on the
FUN forums.
</p>
</div>
</div>
</div>
<div id="outline-container-orgb88bcaf" class="outline-2">
<h2 id="orgb88bcaf">A stub of replicable article</h2>
<div class="outline-text-2" id="text-orgb88bcaf">
<div id="outline-container-orgc07c3d5" class="outline-2">
<h2 id="orgc07c3d5">A stub of a replicable article</h2>
<div class="outline-text-2" id="text-orgc07c3d5">
<p>
This section is illustrated in a <a href="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
......@@ -473,7 +479,7 @@ tar zxf replicable_article.tgz; <span style="font-weight: bold;">cd</span> repli
<ul class="org-ul">
<li style="margin-bottom:0;"><p>
If the <code>make</code> command fails (especially on Mac), it may be because
emacs or something else is not correctly installed. In that case,
Emacs or something else is not correctly installed. In that case,
open the article directly with the following command:
</p>
<div class="org-src-container">
......@@ -504,33 +510,33 @@ chunk of code when exporting.
</div>
</div>
<div id="outline-container-org01b2658" class="outline-2">
<h2 id="org01b2658">Emacs Tips and tricks</h2>
<div class="outline-text-2" id="text-org01b2658">
<div id="outline-container-org307cdb9" class="outline-2">
<h2 id="org307cdb9">Emacs tips and tricks</h2>
<div class="outline-text-2" id="text-org307cdb9">
</div>
<div id="outline-container-orgd56b777" class="outline-3">
<h3 id="orgd56b777">Cheat-sheets</h3>
<div class="outline-text-3" id="text-orgd56b777">
<div id="outline-container-orgd5d3ba1" class="outline-3">
<h3 id="orgd5d3ba1">Cheat-sheets</h3>
<div class="outline-text-3" id="text-orgd5d3ba1">
<p>
Learning emacs and org-mode can be difficult as there is an inordinate
Learning Emacs and Org-Mode can be difficult as there is an inordinate
amount of shortcuts. Many people have thus come up with
cheat-sheats. Here is a selection in case it helps:
</p>
</div>
<div id="outline-container-orge166ddb" class="outline-4">
<h4 id="orge166ddb">Emacs</h4>
<div class="outline-text-4" id="text-orge166ddb">
<div id="outline-container-org9ae5f18" class="outline-4">
<h4 id="org9ae5f18">Emacs</h4>
<div class="outline-text-4" id="text-org9ae5f18">
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="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>
<li style="margin-bottom:0;"><a href="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>
<li style="margin-bottom:0;"><a href="https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf">The official GNU emacs refcard</a></li>
<li style="margin-bottom:0;">Two graphical cheat-sheats by Sacha Hua on <a href="http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png">how to learn emacs</a> and on
<a href="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>
<li style="margin-bottom:0;">Two graphical cheat-sheats by Sacha Chua on <a href="http://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png">how to learn Emacs</a> and on
<a href="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>
</ul>
</div>
</div>
<div id="outline-container-org408f38a" class="outline-4">
<h4 id="org408f38a">Org-mode</h4>
<div class="outline-text-4" id="text-org408f38a">
<div id="outline-container-org6571d83" class="outline-4">
<h4 id="org6571d83">Org-mode</h4>
<div class="outline-text-4" id="text-org6571d83">
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="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>
<li style="margin-bottom:0;"><a href="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:
</div>
</div>
</div>
<div id="outline-container-org0d09525" class="outline-3">
<h3 id="org0d09525">Video tutorials</h3>
<div class="outline-text-3" id="text-org0d09525">
<div id="outline-container-orgde8cbd9" class="outline-3">
<h3 id="orgde8cbd9">Video tutorials</h3>
<div class="outline-text-3" id="text-orgde8cbd9">
<p>
For those of you who prefer video explanations, here is a <a href="https://www.youtube.com/playlist?list=PL9KxKa8NpFxIcNQa9js7dQQIHc81b0-Xg">Youtube
channel with many step by step emacs tutorials</a>.
</p>
</div>
</div>
<div id="outline-container-org5254050" class="outline-3">
<h3 id="org5254050">Additional useful emacs packages</h3>
<div class="outline-text-3" id="text-org5254050">
<div id="outline-container-orgcc0edda" class="outline-3">
<h3 id="orgcc0edda">Additional useful emacs packages</h3>
<div class="outline-text-3" id="text-orgcc0edda">
</div>
<div id="outline-container-orgb7773c1" class="outline-4">
<h4 id="orgb7773c1">Company-mode</h4>
<div class="outline-text-4" id="text-orgb7773c1">
<div id="outline-container-org3b26a95" class="outline-4">
<h4 id="org3b26a95">Company-mode</h4>
<div class="outline-text-4" id="text-org3b26a95">
<p>
<a href="http://company-mode.github.io/">Company-mode</a> is a text completion framework for Emacs. It allows to
have smart completion in emacs for the most common languages. If you
......@@ -563,18 +569,18 @@ official Web page: <a href="http://company-mode.github.io/">http://company-mode.
</p>
</div>
</div>
<div id="outline-container-org700813f" class="outline-4">
<h4 id="org700813f">Magit</h4>
<div class="outline-text-4" id="text-org700813f">
<div id="outline-container-org7fcac5c" class="outline-4">
<h4 id="org7fcac5c">Magit</h4>
<div class="outline-text-4" id="text-org7fcac5c">
<p>
<a href="https://magit.vc/">Magit</a> is an emacs interface for Git. Its usage is briefly illustrated
<a href="https://magit.vc/">Magit</a> is an Emacs interface for Git. Its usage is briefly illustrated
in the context of this MOOC in a <a href="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).
</p>
<p>
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 <a href="https://magit.vc/screenshots/">this visual
walk-through</a> or <a href="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
......@@ -583,9 +589,9 @@ invoke magit by using <code>C-x g</code>.
</div>
</div>
</div>
<div id="outline-container-org5e0e6f3" class="outline-3">
<h3 id="org5e0e6f3">Other resources</h3>
<div class="outline-text-3" id="text-org5e0e6f3">
<div id="outline-container-orgc6ce93f" class="outline-3">
<h3 id="orgc6ce93f">Other resources</h3>
<div class="outline-text-3" id="text-orgc6ce93f">
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://orgmode.org/orgguide.pdf">The compact Org-mode Guide</a></li>
<li style="margin-bottom:0;"><a href="https://github.com/dfeich/org-babel-examples">Many examples illustrating the use of different languages in org-mode</a></li>
......
......@@ -4,34 +4,34 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgbac7796">Installing Git</a>
<li style="margin-bottom:0;"><a href="#orgb4c31ec">Installing Git</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org548b276">Linux (debian, ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#org7ba69dc">Mac OSX and Windows</a></li>
<li style="margin-bottom:0;"><a href="#org09b4b3e">Linux (Debian, Ubuntu)</a></li>
<li style="margin-bottom:0;"><a href="#org577d5b6">Mac OSX and Windows</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgbb46186">Configuring Git</a>
<li style="margin-bottom:0;"><a href="#org1c7dd99">Configuring Git</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org7c8db1d">Telling Git who you are: Name and Email</a></li>
<li style="margin-bottom:0;"><a href="#org7809667">Dealing with proxies</a></li>
<li style="margin-bottom:0;"><a href="#org6a9f6ba">Getting your default password on GitLab (and possibly changing it)</a></li>
<li style="margin-bottom:0;"><a href="#org26c8420">Remembering your password locally</a></li>
<li style="margin-bottom:0;"><a href="#org2b2cd36">Optional: authenticating through SSH</a>
<li style="margin-bottom:0;"><a href="#orgb1c6037">Telling Git who you are: Name and Email</a></li>
<li style="margin-bottom:0;"><a href="#orgf0a659e">Dealing with proxies</a></li>
<li style="margin-bottom:0;"><a href="#orgdd9a986">Getting your default password on GitLab (and possibly changing it)</a></li>
<li style="margin-bottom:0;"><a href="#org55a17e7">Remembering your password locally</a></li>
<li style="margin-bottom:0;"><a href="#orgd15ad74">Optional: authenticating through SSH</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgdbae6d8">Installing SSH</a></li>
<li style="margin-bottom:0;"><a href="#orga57a836">Setting up SSH on GitLab</a></li>
<li style="margin-bottom:0;"><a href="#orge625282">Installing SSH</a></li>
<li style="margin-bottom:0;"><a href="#orgdeb4516">Setting up SSH on GitLab</a></li>
</ul>
</li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org8e2cee5">Using Git through the command line to synchronize your local files with Gitlab</a></li>
<li style="margin-bottom:0;"><a href="#orgce4c84d">Using Git through the command line to synchronize your local files with Gitlab</a></li>
</ul>
</div>
</div>
<p>
<b>This document is particularly important if you follow the Rstudio or
the Org-Mode course.</b> <b>If you follow the Jupyter course, it can be
ignored in a first step</b> <b>as we have closely integrated Jupyter and
<b>This document is particularly important if you follow the RStudio or
the Org-Mode path.</b> <b>If you follow the Jupyter path, it can be
ignored at first</b> <b>as we have closely integrated Jupyter and
GitLab in the context of this MOOC.</b>
</p>
......@@ -61,17 +61,17 @@ Please read all these instructions carefully, in particular the one on
"Configuring your password on GitLab".
</p>
<div id="outline-container-orgbac7796" class="outline-2">
<h2 id="orgbac7796">Installing Git</h2>
<div class="outline-text-2" id="text-orgbac7796">
<div id="outline-container-orgb4c31ec" class="outline-2">
<h2 id="orgb4c31ec">Installing Git</h2>
<div class="outline-text-2" id="text-orgb4c31ec">
</div>
<div id="outline-container-org548b276" class="outline-3">
<h3 id="org548b276">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-org548b276">
<div id="outline-container-org09b4b3e" class="outline-3">
<h3 id="org09b4b3e">Linux (Debian, Ubuntu)</h3>
<div class="outline-text-3" id="text-org09b4b3e">
<p>
We provide here only instructions for debian-based distributions. Feel
We provide here only instructions for Debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
for other distributions (e.g., RedHat, Fedora).
</p>
<p>
......@@ -83,13 +83,13 @@ Run (as root):
</div>
</div>
</div>
<div id="outline-container-org7ba69dc" class="outline-3">
<h3 id="org7ba69dc">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-org7ba69dc">
<div id="outline-container-org577d5b6" class="outline-3">
<h3 id="org577d5b6">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-org577d5b6">
<ul class="org-ul">
<li style="margin-bottom:0;">Download and install Git from the <a href="https://git-scm.com/downloads">Git website</a>.</li>
<li style="margin-bottom:0;">Optional Git clients (should not be needed if you work within
Rstudio):
RStudio):
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://www.sourcetreeapp.com/">SourceTree</a></li>
<li style="margin-bottom:0;"><p>
......@@ -105,15 +105,15 @@ Rstudio):
</div>
</div>
</div>
<div id="outline-container-orgbb46186" class="outline-2">
<h2 id="orgbb46186">Configuring Git</h2>
<div class="outline-text-2" id="text-orgbb46186">
<div id="outline-container-org1c7dd99" class="outline-2">
<h2 id="org1c7dd99">Configuring Git</h2>
<div class="outline-text-2" id="text-org1c7dd99">
</div>
<div id="outline-container-org7c8db1d" class="outline-3">
<h3 id="org7c8db1d">Telling Git who you are: Name and Email</h3>
<div class="outline-text-3" id="text-org7c8db1d">
<div id="outline-container-orgb1c6037" class="outline-3">
<h3 id="orgb1c6037">Telling Git who you are: Name and Email</h3>
<div class="outline-text-3" id="text-orgb1c6037">
<ol class="org-ol">
<li style="margin-bottom:0;">Open Terminal.</li>
<li style="margin-bottom:0;">Open terminal.</li>
<li style="margin-bottom:0;"><p>
Set a Git username and email:
</p>
......@@ -140,9 +140,9 @@ email@example.com
</ol>
</div>
</div>
<div id="outline-container-org7809667" class="outline-3">
<h3 id="org7809667">Dealing with proxies</h3>
<div class="outline-text-3" id="text-org7809667">
<div id="outline-container-orgf0a659e" class="outline-3">
<h3 id="orgf0a659e">Dealing with proxies</h3>
<div class="outline-text-3" id="text-orgf0a659e">
<p>
You may be behind a proxy, in which case you may have trouble cloning
or fetching from a remote repository or you may get an error like
......@@ -164,11 +164,14 @@ will be prompted for it every time it is needed.
</p>
</div>
</div>
<div id="outline-container-org6a9f6ba" class="outline-3">
<h3 id="org6a9f6ba">Getting your default password on GitLab (and possibly changing it)</h3>
<div class="outline-text-3" id="text-org6a9f6ba">
<div id="outline-container-orgdd9a986" class="outline-3">
<h3 id="orgdd9a986">Getting your default password on GitLab (and possibly changing it)</h3>
<div class="outline-text-3" id="text-orgdd9a986">
<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>
<ol class="org-ol">
......@@ -224,13 +227,13 @@ button).
</div>
</div></li>
<li style="margin-bottom:0;"><p>
If you wish to modify your password, you shoul go to <code>Account &gt; Settings &gt; Password</code>
If you wish to modify your password, you should go to <code>Account &gt; Settings &gt; Password</code>
and define your password using the default
password you just retrieved. Again, if you use the Jupyter
notebooks we have deployed for the MOOC, remember that 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> through a jupyter console (see next
Jupyter <code>~/.git-credentials</code> through a Jupyter console (see next
section).
</p>
<div class="org-center">
......@@ -242,9 +245,9 @@ section).
</ol>
</div>
</div>
<div id="outline-container-org26c8420" class="outline-3">
<h3 id="org26c8420">Remembering your password locally</h3>
<div class="outline-text-3" id="text-org26c8420">
<div id="outline-container-org55a17e7" class="outline-3">
<h3 id="org55a17e7">Remembering your password locally</h3>
<div class="outline-text-3" id="text-org55a17e7">
<p>
If you clone your repository by simply pasting the GitLab URL, you will be
prompted for your login and your password every time you want to
......@@ -278,9 +281,9 @@ Use it at your own risk.
</p>
</div>
</div>
<div id="outline-container-org2b2cd36" class="outline-3">
<h3 id="org2b2cd36">Optional: authenticating through SSH</h3>
<div class="outline-text-3" id="text-org2b2cd36">
<div id="outline-container-orgd15ad74" class="outline-3">
<h3 id="orgd15ad74">Optional: authenticating through SSH</h3>
<div class="outline-text-3" id="text-orgd15ad74">
<p>
There are two ways of authenticating and synchronizing your local
repository with GitLab: through HTTPS or through SSH. The first one is
......@@ -293,17 +296,17 @@ your SSH public key on GitLab. This section provides with information
on how to do this.
</p>
</div>
<div id="outline-container-orgdbae6d8" class="outline-4">
<h4 id="orgdbae6d8">Installing SSH</h4>
<div class="outline-text-4" id="text-orgdbae6d8">
<div id="outline-container-orge625282" class="outline-4">
<h4 id="orge625282">Installing SSH</h4>
<div class="outline-text-4" id="text-orge625282">
</div>
<ul class="org-ul">
<li style="margin-bottom:0;"><a id="orgefff3f4"></a>Linux (debian, ubuntu)<br />
<div class="outline-text-5" id="text-orgefff3f4">
<li style="margin-bottom:0;"><a id="org83c4fd1"></a>Linux (Debian, Ubuntu)<br />
<div class="outline-text-5" id="text-org83c4fd1">
<p>
We provide here only instructions for debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
for other distributions (e.g., RedHat, Fedora).
</p>
<p>
......@@ -315,15 +318,15 @@ Run (as root):
</div>
</div>
</li>
<li style="margin-bottom:0;"><a id="org8601462"></a>Mac OSX<br />
<div class="outline-text-5" id="text-org8601462">
<li style="margin-bottom:0;"><a id="org4944f97"></a>macOS<br />
<div class="outline-text-5" id="text-org4944f97">
<p>
You do not have anything to do as it is installed by default.
</p>
</div>
</li>
<li style="margin-bottom:0;"><a id="org488195e"></a>Windows<br />
<div class="outline-text-5" id="text-org488195e">
<li style="margin-bottom:0;"><a id="org92094db"></a>Windows<br />
<div class="outline-text-5" id="text-org92094db">
<p>
You should install the <a href="https://www.ssh.com/ssh/putty/windows/">Putty</a> client. Once it is installed, look for
the section on <a href="https://www.ssh.com/ssh/putty/windows/puttygen">generating an SSH key</a>.
......@@ -332,9 +335,9 @@ the section on <a href="https://www.ssh.com/ssh/putty/windows/puttygen">generati
</li>
</ul>
</div>
<div id="outline-container-orga57a836" class="outline-4">
<h4 id="orga57a836">Setting up SSH on GitLab</h4>
<div class="outline-text-4" id="text-orga57a836">
<div id="outline-container-orgdeb4516" class="outline-4">
<h4 id="orgdeb4516">Setting up SSH on GitLab</h4>
<div class="outline-text-4" id="text-orgdeb4516">
<p>
Here are <a href="https://docs.gitlab.com/ee/ssh/">all the official explanations on how to set up your SSH key
on GitLab</a>. Alternatively, you may also want to have a look at this
......@@ -345,15 +348,15 @@ video:
</div>
</div>
</div>
<div id="outline-container-org8e2cee5" class="outline-2">
<h2 id="org8e2cee5">Using Git through the command line to synchronize your local files with Gitlab</h2>
<div class="outline-text-2" id="text-org8e2cee5">
<div id="outline-container-orgce4c84d" class="outline-2">
<h2 id="orgce4c84d">Using Git through the command line to synchronize your local files with Gitlab</h2>
<div class="outline-text-2" id="text-orgce4c84d">
<p>
This section describes a generic (through the command line) way to
synchronize your local files with Gitlab. You will not need this if
you follow the Jupyter course. If you follow the Rstudio course, all
these operations can be done through Rstudio and you may want to read
<a href="rstudio.html">the corresponding instructions</a>. If you follow the Org-Mode course, all
you follow the Jupyter path. If you follow the RStudio path, all
these operations can be done through RStudio and you may want to read
<a href="rstudio.html">the corresponding instructions</a>. If you follow the Org-Mode path, all
these operations can be done through Magit and you may want to read
<a href="emacs_orgmode.html">the corresponding instructions</a>.
</p>
......
......@@ -4,28 +4,26 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orga30368c">1. Jupyter Tips and tricks</a>
<li style="margin-bottom:0;"><a href="#org0b4fddb">1. Jupyter tips and tricks</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgd2ffcbf">Running R and Python in the same notebook</a></li>
<li style="margin-bottom:0;"><a href="#org814998b">Other languages</a></li>
<li style="margin-bottom:0;"><a href="#orgfa26619">Running R and Python in the same notebook</a></li>
<li style="margin-bottom:0;"><a href="#org6905b1c">Other languages</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org745ca35">2. Installing and configuring Jupyter on your computer</a>
<li style="margin-bottom:0;"><a href="#org71d8232">2. Installing and configuring Jupyter on your computer</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org82ca2e6">2.1 Installing Jupyter</a></li>
<li style="margin-bottom:0;"><a href="#orgb5f2e75">2.2 Making sure Jupyter allows you to use R</a>
<li style="margin-bottom:0;"><a href="#org080a19d">2.1 Installing Jupyter</a></li>
<li style="margin-bottom:0;"><a href="#org74a2cde">2.2 Making sure Jupyter allows you to use R</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgac7ff27">• Installing IRKernel (R package)</a></li>
<li style="margin-bottom:0;"><a href="#orge8f65a7">• Installing rpy2 (Python package)</a></li>
<li style="margin-bottom:0;"><a href="#orgb3f32d9">• Installing IRKernel (R package)</a></li>
<li style="margin-bottom:0;"><a href="#org4157978">• Installing rpy2 (Python package)</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org2730350">2.3 Additional tips</a>
<li style="margin-bottom:0;"><a href="#org3c0a58e">2.3 Additional tips</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org3e523fe">• Exporting a notebook</a></li>
<li style="margin-bottom:0;"><a href="#orgb47da83">• Side note about Jupyter, JupyterLab, JupyterHub&#x2026;</a></li>
<li style="margin-bottom:0;"><a href="#org76b25cc">• Improving notebook readability</a></li>
<li style="margin-bottom:0;"><a href="#org913ba64">• Interacting with GitLab and GitHub</a></li>
<li style="margin-bottom:0;"><a href="#orgb3e3b0d">• Using other languages (e.g., SAS, Matlab, Mathematica, etc.)</a></li>
<li style="margin-bottom:0;"><a href="#org847c6d1">• Exporting a notebook</a></li>
<li style="margin-bottom:0;"><a href="#org581d99c">• Improving notebook readability</a></li>
<li style="margin-bottom:0;"><a href="#org3ec1745">• Interacting with GitLab and GitHub</a></li>
</ul>
</li>
</ul>
......@@ -34,20 +32,20 @@
</div>
</div>
<div id="outline-container-orga30368c" class="outline-2">
<h2 id="orga30368c">1. Jupyter Tips and tricks</h2>
<div class="outline-text-2" id="text-orga30368c">
<div id="outline-container-org0b4fddb" class="outline-2">
<h2 id="org0b4fddb">1. Jupyter tips and tricks</h2>
<div class="outline-text-2" id="text-org0b4fddb">
<p>
The following <a href="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
the tricks may have been integrated in the default behavior of Jupyter
now).
</p>
</div>
<div id="outline-container-orgd2ffcbf" class="outline-3">
<h3 id="orgd2ffcbf">Running R and Python in the same notebook</h3>
<div class="outline-text-3" id="text-orgd2ffcbf">
<div id="outline-container-orgfa26619" class="outline-3">
<h3 id="orgfa26619">Running R and Python in the same notebook</h3>
<div class="outline-text-3" id="text-orgfa26619">
<p>
<code>rpy2</code> package allows to use both languages in the same notebook by:
</p>
......@@ -84,32 +82,44 @@ python cell.
</p>
</div>
</div>
<div id="outline-container-org814998b" class="outline-3">
<h3 id="org814998b">Other languages</h3>
<div class="outline-text-3" id="text-org814998b">
<div id="outline-container-org6905b1c" class="outline-3">
<h3 id="org6905b1c">Other languages</h3>
<div class="outline-text-3" id="text-org6905b1c">
<p>
For any reason, you may be unsatisfied with the use of R or of
Python. Many other languages are available:
Jupyter is not limited to Pytyhon and R. Many other languages are available:
<a href="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&#x2026;
non-free languages like SAS, Mathematica, Matlab&#x2026; Note that the maturity of these kernels differs widely.
</p>
<p>
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
to set up your own Jupyter notebooks on your computer and benefit from these
extensions.
MOOC but you may want to read the next sections to learn how
to set up your own Jupyter on your computer and benefit from these 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 <a href="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the <a href="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step
explanations about this are given <a href="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.
</p>
</div>
</div>
</div>
<div id="outline-container-org745ca35" class="outline-2">
<h2 id="org745ca35">2. Installing and configuring Jupyter on your computer</h2>
<div class="outline-text-2" id="text-org745ca35">
<div id="outline-container-org71d8232" class="outline-2">
<h2 id="org71d8232">2. Installing and configuring Jupyter on your computer</h2>
<div class="outline-text-2" id="text-org71d8232">
<p>
In this Section, we provide information on how to set up on your own
computer a Jupyter environment similar to the one deployed for this
MOOC.
In this section, we explain how to set up a Jupyter environment on
your own computer similar to the one deployed for this MOOC.
</p>
<p>
......@@ -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: <a href="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a>, which allows
you to mix various components (including notebooks) in your
browser. In the context of this MOOC, our time frame was too short to
benefit from JupyterLab which was still under active development but
this is probably the best option now if you want to benefit from
cutting-edge Jupyter notebooks.
benefit from JupyterLab which was still under active development. You may, however, prefer JupyterLab when doing an installation on your own computer.
</p>
</div>
<div id="outline-container-org82ca2e6" class="outline-3">
<h3 id="org82ca2e6">2.1 Installing Jupyter</h3>
<div class="outline-text-3" id="text-org82ca2e6">
<div id="outline-container-org080a19d" class="outline-3">
<h3 id="org080a19d">2.1 Installing Jupyter</h3>
<div class="outline-text-3" id="text-org080a19d">
<p>
Follow these instructions if you wish to have a Jupyter environment on
your own computer similar to the one we set up for this MOOC.
......@@ -158,18 +166,18 @@ jupyter notebook
</div>
</div>
</div>
<div id="outline-container-orgb5f2e75" class="outline-3">
<h3 id="orgb5f2e75">2.2 Making sure Jupyter allows you to use R</h3>
<div class="outline-text-3" id="text-orgb5f2e75">
<div id="outline-container-org74a2cde" class="outline-3">
<h3 id="org74a2cde">2.2 Making sure Jupyter allows you to use R</h3>
<div class="outline-text-3" id="text-org74a2cde">
<p>
The previous environment should ship with R but if you proceeded
otherwise and only have python available in Jupyter, you may want to
read the following section.
The environment described in the last section should include R, but if
you proceeded otherwise and only have Python available in Jupyter, you
may want to read the following section.
</p>
</div>
<div id="outline-container-orgac7ff27" class="outline-4">
<h4 id="orgac7ff27">• Installing <a href="https://github.com/IRkernel/IRkernel">IRKernel</a> (R package)</h4>
<div class="outline-text-4" id="text-orgac7ff27">
<div id="outline-container-orgb3f32d9" class="outline-4">
<h4 id="orgb3f32d9">• Installing <a href="https://github.com/IRkernel/IRkernel">IRKernel</a> (R package)</h4>
<div class="outline-text-4" id="text-orgb3f32d9">
<p>
Do the following in R console:
</p>
......@@ -205,9 +213,9 @@ IRkernel::installspec() <span style="font-weight: bold; font-style: italic;">#
</div>
</div>
<div id="outline-container-orge8f65a7" class="outline-4">
<h4 id="orge8f65a7">• Installing rpy2 (Python package)</h4>
<div class="outline-text-4" id="text-orge8f65a7">
<div id="outline-container-org4157978" class="outline-4">
<h4 id="org4157978">• Installing rpy2 (Python package)</h4>
<div class="outline-text-4" id="text-org4157978">
<p>
On Linux, the rpy2 package is available in standard distributions
</p>
......@@ -216,8 +224,8 @@ On Linux, the rpy2 package is available in standard distributions
</pre>
</div>
<p>
An other (not really recommended if the first one is available)
alternative consists in going through the python package manager with
An alternative (not really recommended if the first one is available)
consists in going through the python package manager with
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-python">pip3 install rpy2
......@@ -229,7 +237,7 @@ alternative consists in going through the python package manager with
</p>
<p>
Download <code>rpy2</code> <a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2">binary file</a> by choosing the right operating system.
Download the <code>rpy2</code> <a href="https://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2">binary file</a> by choosing the right operating system.
</p>
<p>
......@@ -250,15 +258,15 @@ Install also <code>tzlocal</code>:
</div>
</div>
</div>
<div id="outline-container-org2730350" class="outline-3">
<h3 id="org2730350">2.3 Additional tips</h3>
<div class="outline-text-3" id="text-org2730350">
<div id="outline-container-org3c0a58e" class="outline-3">
<h3 id="org3c0a58e">2.3 Additional tips</h3>
<div class="outline-text-3" id="text-org3c0a58e">
</div>
<div id="outline-container-org3e523fe" class="outline-4">
<h4 id="org3e523fe">• Exporting a notebook</h4>
<div class="outline-text-4" id="text-org3e523fe">
<div id="outline-container-org847c6d1" class="outline-4">
<h4 id="org847c6d1">• Exporting a notebook</h4>
<div class="outline-text-4" id="text-org847c6d1">
<p>
Here is what we had to install on our recent debian computer to make sure
Here is what we had to install on a recent Debian computer to make sure
the notebook export via LaTeX works:
</p>
<div class="org-src-container">
......@@ -294,19 +302,16 @@ taste.
</p>
<p>
Download and install MiKTeX from the <a href="https://miktex.org/download">MiKTeX webpage</a>
by choosing the right operating system. You will be prompted to install some specific
Download and install MiKTeX from the <a href="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.
</p>
</div>
</div>
<div id="outline-container-orgb47da83" class="outline-4">
<h4 id="orgb47da83">• Side note about Jupyter, JupyterLab, JupyterHub&#x2026;</h4>
</div>
<div id="outline-container-org76b25cc" class="outline-4">
<h4 id="org76b25cc">• Improving notebook readability</h4>
<div class="outline-text-4" id="text-org76b25cc">
<div id="outline-container-org581d99c" class="outline-4">
<h4 id="org581d99c">• Improving notebook readability</h4>
<div class="outline-text-4" id="text-org581d99c">
<p>
Here are a few extensions that can ease your life:
</p>
......@@ -333,11 +338,11 @@ jupyter-serverextension enable --py hide_code
</div>
</div>
<div id="outline-container-org913ba64" class="outline-4">
<h4 id="org913ba64">• Interacting with GitLab and GitHub</h4>
<div class="outline-text-4" id="text-org913ba64">
<div id="outline-container-org3ec1745" class="outline-4">
<h4 id="org3ec1745">• Interacting with GitLab and GitHub</h4>
<div class="outline-text-4" id="text-org3ec1745">
<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
the MOOC but inspired from a previous <a href="https://github.com/Lab41/sunny-side-up">proof of concept</a>. We have
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
</p>
<p>
Last but not least, remember that Jupyter notebooks are only a small
part of the picture and that Jupyter is now part of a bigger project:
<a href="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 <a href="https://github.com/jupyterlab/jupyterlab-git">JupyterLab git plugin</a> has been
developed to offer a nice version control experience.
</p>
</div>
</div>
<div id="outline-container-orgb3e3b0d" class="outline-4">
<h4 id="orgb3e3b0d">• Using other languages (e.g., SAS, Matlab, Mathematica, etc.)</h4>
<div class="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:
<a href="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&#x2026;
</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 <a href="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the <a href="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step
explanations about this are given <a href="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.
For those who use <a href="https://blog.jupyter.org/jupyterlab-is-ready-for-users-5a6f039b8906">JupyterLab</a> rather than the plain Jupyter, a specific <a href="https://github.com/jupyterlab/jupyterlab-git">JupyterLab git plugin</a> has been developed to offer a nice version control experience.
</p>
</div>
</div>
......
......@@ -4,84 +4,44 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org4cb4b16">Installing Rstudio</a>
<li style="margin-bottom:0;"><a href="#org04cfe56">Installing RStudio</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#orgdbedec7">Linux (debian, ubuntu)</a>
<li style="margin-bottom:0;"><a href="#org9d22fe6">Linux (debian, ubuntu)</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org333ce54">Installing R</a></li>
<li style="margin-bottom:0;"><a href="#orge1d36b8">Installing rstudio</a></li>
<li style="margin-bottom:0;"><a href="#org353c66d">Installing R</a></li>
<li style="margin-bottom:0;"><a href="#orga0a31f1">Installing RStudio</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#org91c1015">Mac OSX and Windows</a></li>
<li style="margin-bottom:0;"><a href="#org7bc3813">Mac OSX and Windows</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgc0d9286">Using Git from Rstudio</a>
<li style="margin-bottom:0;"><a href="#org0eece52">RStudio documentation</a></li>
<li style="margin-bottom:0;"><a href="#orgf1348bc">Using Git from RStudio</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org1cab696">Cloning a repository</a></li>
<li style="margin-bottom:0;"><a href="#org1707e53">Modifying a file</a></li>
<li style="margin-bottom:0;"><a href="#org2aec51e">Cloning a repository</a></li>
<li style="margin-bottom:0;"><a href="#orga7c1559">Modifying a file</a></li>
</ul>
</li>
</ul>
</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 <a href="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><a href="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 <a href="https://www.youtube.com/embed/uHYcDQDbMY8">this video</a> (in English). If you
do not like videos, you should have a look at the <a href="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 <a href="https://www.rstudio.com/resources/cheatsheets/">Cheat
sheets webpage</a>. In particular you may want to have look at the
following ones:
</p>
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/rstudio-ide.pdf">The Rstudio IDE</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf">R Markdown</a> (here is also a <a href="https://rmarkdown.rstudio.com/">nice step-by-step presentation of Rmarkdown</a>),</li>
<li style="margin-bottom:0;">The <a href="https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf">R Markdown Reference guide</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/data-visualization-2.1.pdf">Data visualization with ggplot2</a>,</li>
<li style="margin-bottom:0;"><a href="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
of these documents:
</p>
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/translations/french/rstudio-IDE-cheatsheet.pdf">L'IDE Rstudio</a></li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/translations/french/ggplot2-french-cheatsheet.pdf">Visualisation de données avec ggplot2</a></li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/translations/french/data-wrangling-french.pdf">Transformation de données avec dplyr</a></li>
<li style="margin-bottom:0;"><a href="https://www.fun-mooc.fr/c4x/UPSUD/42001S02/asset/RMarkdown.pdf">Un court document sur R Markdown</a></li>
</ul>
<div id="outline-container-org4cb4b16" class="outline-2">
<h2 id="org4cb4b16">Installing Rstudio</h2>
<div class="outline-text-2" id="text-org4cb4b16">
<div id="outline-container-org04cfe56" class="outline-2">
<h2 id="org04cfe56">Installing RStudio</h2>
<div class="outline-text-2" id="text-org04cfe56">
</div>
<div id="outline-container-orgdbedec7" class="outline-3">
<h3 id="orgdbedec7">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-orgdbedec7">
<div id="outline-container-org9d22fe6" class="outline-3">
<h3 id="org9d22fe6">Linux (debian, ubuntu)</h3>
<div class="outline-text-3" id="text-org9d22fe6">
<p>
We provide here only instructions for debian-based distributions. Feel
We provide here only instructions for Debian-based distributions. Feel
free to contribute to this document to provide up-to-date information
for other distributions (e.g., redhat, fedora).
for other distributions (e.g., RedHat, Fedora).
</p>
<p>
Today, the stable versions of the most common distributions provide
recent enough versions of emacs and org-mode:
recent enough versions of R:
</p>
<ul class="org-ul">
<li style="margin-bottom:0;">Debian (stretch) ships with <a href="https://packages.debian.org/stretch/r-base">R 3.3.3-1</a>, <a href="https://packages.debian.org/stretch/r-cran-knitr">knitr 1.15.1</a>, and <a href="https://packages.debian.org/stretch/r-cran-ggplot2">ggplot 2.2.1</a></li>
......@@ -94,11 +54,11 @@ for upgrading&#x2026;
</p>
</div>
<div id="outline-container-org333ce54" class="outline-4">
<h4 id="org333ce54">Installing R</h4>
<div class="outline-text-4" id="text-org333ce54">
<div id="outline-container-org353c66d" class="outline-4">
<h4 id="org353c66d">Installing R</h4>
<div class="outline-text-4" id="text-org353c66d">
<p>
Beforehand, you need to install the R language and convenient packages
First, you need to install the R language and convenient packages
by running (as root):
</p>
<div class="org-src-container">
......@@ -110,7 +70,7 @@ by running (as root):
Alternatively, if the installation of <code>r-cran-gplot2</code> or <code>r-cran-knitr</code>
fails, you may want to install them locally (through the R packaging
system) and manually by running the following commands in R (or
Rstudio):
RStudio):
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-R">install.packages(<span style="font-style: italic;">"knitr"</span>)
......@@ -129,14 +89,13 @@ to run (as root):
</div>
</div>
<div id="outline-container-orge1d36b8" class="outline-4">
<h4 id="orge1d36b8">Installing rstudio</h4>
<div class="outline-text-4" id="text-orge1d36b8">
<div id="outline-container-orga0a31f1" class="outline-4">
<h4 id="orga0a31f1">Installing RStudio</h4>
<div class="outline-text-4" id="text-orga0a31f1">
<p>
Rstudio is unfortunately not packaged within debian so the easiest is
to download the corresponding debian package on the <a href="https://www.rstudio.com/products/rstudio/download/#download">Rstudio webpage</a>
and then to install it manually (depending on when you do this, you
can obviously change the version number). Here is how to install it:
RStudio is unfortunately not packaged within Debian so the easiest is
to download the corresponding Debian package on the <a href="https://www.rstudio.com/products/rstudio/download/#download">RStudio webpage</a>
and then to install it manually (you may have to adjust the version number in the following example). Here is how to install it:
</p>
<div class="org-src-container">
......@@ -149,9 +108,9 @@ sudo apt-get update ; sudo apt-get -f install <span style="font-weight: bold; fo
</div>
</div>
</div>
<div id="outline-container-org91c1015" class="outline-3">
<h3 id="org91c1015">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-org91c1015">
<div id="outline-container-org7bc3813" class="outline-3">
<h3 id="org7bc3813">Mac OSX and Windows</h3>
<div class="outline-text-3" id="text-org7bc3813">
<blockquote>
<p>
Some instructions on installing R and knitr must be missing. This
......@@ -160,9 +119,9 @@ should be tested and improved.
</blockquote>
<ul class="org-ul">
<li style="margin-bottom:0;">Download and install R from the <a href="https://cran.r-project.org/">CRAN webpage</a> by choosing the right operating system.</li>
<li style="margin-bottom:0;">Download and install Rstudio from the <a href="https://www.rstudio.com/products/rstudio/download/#download">Rstudio webpage</a> by choosing the right operating system.</li>
<li style="margin-bottom:0;">Download and install RStudio from the <a href="https://www.rstudio.com/products/rstudio/download/#download">RStudio webpage</a> by choosing the right operating system.</li>
<li style="margin-bottom:0;">Download and install MiKTeX from the <a href="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>
<li style="margin-bottom:0;">Open Rstudio and type the following commands in the console to install <code>knitr</code> and <code>ggplot2</code>:</li>
<li style="margin-bottom:0;">Open RStudio and type the following commands in the console to install <code>knitr</code> and <code>ggplot2</code>:</li>
</ul>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-R">install.packages(<span style="font-style: italic;">"knitr"</span>, dep=<span style="font-weight: bold; text-decoration: underline;">TRUE</span>)
......@@ -172,13 +131,56 @@ install.packages(<span style="font-style: italic;">"ggplot2"</span>, dep=<span s
</div>
</div>
</div>
<div id="outline-container-orgc0d9286" class="outline-2">
<h2 id="orgc0d9286">Using Git from Rstudio</h2>
<div class="outline-text-2" id="text-orgc0d9286">
<div id="outline-container-org0eece52" class="outline-2">
<h2 id="org0eece52">RStudio documentation</h2>
<div class="outline-text-2" id="text-org0eece52">
<p>
The RStudio team has created a lot of very good material and
tutorials. You should definitively look at the <a href="https://www.rstudio.com/resources/cheatsheets/">Cheat sheets
webpage</a>. In particular you may want to have look at the following
ones:
</p>
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/rstudio-ide.pdf">The RStudio IDE</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf">R Markdown</a> (here is also a <a href="https://rmarkdown.rstudio.com/">nice step-by-step presentation of Rmarkdown</a>),</li>
<li style="margin-bottom:0;">The <a href="https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf">R Markdown Reference guide</a>,</li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/data-visualization-2.1.pdf">Data visualization with ggplot2</a>,</li>
<li style="margin-bottom:0;"><a href="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
of these documents:
</p>
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/translations/french/rstudio-IDE-cheatsheet.pdf">L'IDE RStudio</a></li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/translations/french/ggplot2-french-cheatsheet.pdf">Visualisation de données avec ggplot2</a></li>
<li style="margin-bottom:0;"><a href="https://github.com/rstudio/cheatsheets/raw/master/translations/french/data-wrangling-french.pdf">Transformation de données avec dplyr</a></li>
<li style="margin-bottom:0;"><a href="https://www.fun-mooc.fr/c4x/UPSUD/42001S02/asset/RMarkdown.pdf">Un court document sur R Markdown</a></li>
</ul>
</div>
<div id="outline-container-org1cab696" class="outline-3">
<h3 id="org1cab696">Cloning a repository</h3>
<div class="outline-text-3" id="text-org1cab696">
</div>
<div id="outline-container-orgf1348bc" class="outline-2">
<h2 id="orgf1348bc">Using Git from RStudio</h2>
<div class="outline-text-2" id="text-orgf1348bc">
<p>
If you have never used git with RStudio, <b>we strongly advise that you
follow <a href="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><a href="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 <a href="https://www.youtube.com/embed/uHYcDQDbMY8">this video</a> (in English). If you
do not like videos, you should have a look at the <a href="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>
</div>
<div id="outline-container-org2aec51e" class="outline-3">
<h3 id="org2aec51e">Cloning a repository</h3>
<div class="outline-text-3" id="text-org2aec51e">
<p>
Open RStudio and do the following steps:
</p>
......@@ -198,7 +200,7 @@ Create a new version controled project: <code>File / New Project / Version Contr
</div>
</div></li>
<li style="margin-bottom:0;"><p>
Get the url from your gitlab repository:
Get the URL from your GitLab repository:
</p>
<div class="org-center">
......@@ -235,9 +237,9 @@ controled repository.</li>
</ul>
</div>
</div>
<div id="outline-container-org1707e53" class="outline-3">
<h3 id="org1707e53">Modifying a file</h3>
<div class="outline-text-3" id="text-org1707e53">
<div id="outline-container-orga7c1559" class="outline-3">
<h3 id="orga7c1559">Modifying a file</h3>
<div class="outline-text-3" id="text-orga7c1559">
<ul class="org-ul">
<li style="margin-bottom:0;">Open <code>Module2/exo1/toy_document.Rmd</code> and perform a simple
modification.</li>
......
......@@ -3,33 +3,33 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org433b759">Additional references</a>
<li style="margin-bottom:0;"><a href="#org2612284">Additional references</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org8d7f266">"Thoughts" on language/software stability</a></li>
<li style="margin-bottom:0;"><a href="#org888785f">Controlling your software environment</a></li>
<li style="margin-bottom:0;"><a href="#orgf7cdbe6">Preservation/Archiving</a></li>
<li style="margin-bottom:0;"><a href="#orgf05af7d">Workflows</a></li>
<li style="margin-bottom:0;"><a href="#orgb096e6a">Numerical and statistical issues</a></li>
<li style="margin-bottom:0;"><a href="#org54e139e">Publication practices</a></li>
<li style="margin-bottom:0;"><a href="#orge4a456d">Experimentation</a></li>
<li style="margin-bottom:0;"><a href="#org6dd38af">"Thoughts" on language/software stability</a></li>
<li style="margin-bottom:0;"><a href="#orgdcd752c">Controlling your software environment</a></li>
<li style="margin-bottom:0;"><a href="#orgade769d">Preservation/Archiving</a></li>
<li style="margin-bottom:0;"><a href="#org2c58237">Workflows</a></li>
<li style="margin-bottom:0;"><a href="#org5e60f39">Numerical and statistical issues</a></li>
<li style="margin-bottom:0;"><a href="#orgf8363e1">Publication practices</a></li>
<li style="margin-bottom:0;"><a href="#org9cba5c9">Experimentation</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orge6151d1">Tracking environment information</a>
<li style="margin-bottom:0;"><a href="#org55a5ab5">Tracking environment information</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org3df90dc">Getting information about your Git repository</a></li>
<li style="margin-bottom:0;"><a href="#orgf947c9a">Getting information about Python(3) libraries</a>
<li style="margin-bottom:0;"><a href="#orgf3b1e93">Getting information about your Git repository</a></li>
<li style="margin-bottom:0;"><a href="#org6d7f695">Getting information about Python(3) libraries</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org606d1d6">Getting the list of installed packages and their version</a></li>
<li style="margin-bottom:0;"><a href="#orgcba198d">How to list imported modules?</a></li>
<li style="margin-bottom:0;"><a href="#org5cafa9a">Setting up an environment with pip</a></li>
<li style="margin-bottom:0;"><a href="#org151cce9">Installing a new package or a specific version</a></li>
<li style="margin-bottom:0;"><a href="#org546bbcf">Getting the list of installed packages and their version</a></li>
<li style="margin-bottom:0;"><a href="#org88ff00d">How to list imported modules?</a></li>
<li style="margin-bottom:0;"><a href="#org8d6c94f">Saving and restoring an environment with pip</a></li>
<li style="margin-bottom:0;"><a href="#org1fdfaf0">Installing a new package or a specific version</a></li>
</ul>
</li>
<li style="margin-bottom:0;"><a href="#orgaf9f6bf">Getting information about R libraries</a>
<li style="margin-bottom:0;"><a href="#org71f6171">Getting information about R libraries</a>
<ul style="margin:0 0;">
<li style="margin-bottom:0;"><a href="#org60a17ce">Getting the list imported modules and their version</a></li>
<li style="margin-bottom:0;"><a href="#org05bd133">Getting the list of installed packages and their version</a></li>
<li style="margin-bottom:0;"><a href="#orga08b912">Installing a new package or a specific version</a></li>
<li style="margin-bottom:0;"><a href="#org21ba69e">Getting the list imported modules and their version</a></li>
<li style="margin-bottom:0;"><a href="#orgdbb0731">Getting the list of installed packages and their version</a></li>
<li style="margin-bottom:0;"><a href="#org1110f15">Installing a new package or a specific version</a></li>
</ul>
</li>
</ul>
......@@ -38,13 +38,13 @@
</div>
</div>
<div id="outline-container-org433b759" class="outline-2">
<h2 id="org433b759">Additional references</h2>
<div class="outline-text-2" id="text-org433b759">
<div id="outline-container-org2612284" class="outline-2">
<h2 id="org2612284">Additional references</h2>
<div class="outline-text-2" id="text-org2612284">
</div>
<div id="outline-container-org8d7f266" class="outline-3">
<h3 id="org8d7f266">"Thoughts" on language/software stability</h3>
<div class="outline-text-3" id="text-org8d7f266">
<div id="outline-container-org6dd38af" class="outline-3">
<h3 id="org6dd38af">"Thoughts" on language/software stability</h3>
<div class="outline-text-3" id="text-org6dd38af">
<p>
As we explained, the programming language used in an analysis has 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).
<p>
On the other end of the spectrum, <a href="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
time. Furthermore, python is commonly used as a wrapping language
(e.g., to easily use C or FORTRAN libraries) and has its own packaging
system to make everyone's life easier. All these design choices tend
to make reproducibility often a bit painful with python, even though
the community is slowly taking this into account.
development based on a readability philosophy and valuing continuous
improvement over backwards-compatibility. Furthermore, Python is
commonly used as a wrapping language (e.g., to easily use C or FORTRAN
libraries) and has its own packaging system. All these design choices
tend to make reproducibility often a bit painful with Python, even
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>
......@@ -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
relatively recent <a href="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 <a href="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
<code>gplots</code>, <code>survfit</code> from <code>survival</code>, or <code>hclust</code>) whose default
parameters had changed over the years. It is thus probably a good
practice to explicitly indicate in your code default values (, which
can be cumbersome) and to restrict your dependencies as much as
possible.
several issues with a few functions (<code>plotmeans</code> from <code>gplots</code>,
<code>survfit</code> from <code>survival</code>, or <code>hclust</code>) whose default parameters had
changed over the years. It is thus probably good practice to give
explicit values for all parameters (which can be cumbersome) instead
of relying on default values, and to restrict your dependencies as much
as possible.
</p>
<p>
This being said, the R development community is generally quite
careful about stability. We (the authors of this MOOC) think open
source (, which allows to inspect how computation is done and to
identify both mistakes and sources of non reproducibility) is more
important than the rock solid stability of SAS, which is a proprietary
careful about stability. We (the authors of this MOOC) believe that open
source (which allows to inspect how computation is done and to
identify both mistakes and sources of non-reproducibility) is more
important than the rock solid stability of SAS, which is proprietary
software. Yet, if you really need to stay with SAS (similar solutions
probably exist for other languages as well), you should know that SAS
can be used within Jupyter using either the <a href="https://sassoftware.github.io/sas_kernel/">Python SASKernel</a> or the
<a href="https://sassoftware.github.io/saspy/">Python SASPy</a> package (step by step explanations about this are given
<a href="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.
version and environment control will always help.
</p>
</div>
</div>
<div id="outline-container-org888785f" class="outline-3">
<h3 id="org888785f">Controlling your software environment</h3>
<div class="outline-text-3" id="text-org888785f">
<div id="outline-container-orgdcd752c" class="outline-3">
<h3 id="orgdcd752c">Controlling your software environment</h3>
<div class="outline-text-3" id="text-orgdcd752c">
<p>
As we mentioned in the video sequences, there are several solutions to
control your environment:
......@@ -108,8 +108,8 @@ control your environment:
clean environment and install only what's strictly necessary (and document it):
<ul class="org-ul">
<li style="margin-bottom:0;">The very well known <a href="https://www.docker.io/">Docker</a></li>
<li style="margin-bottom:0;"><a href="https://singularity.lbl.gov/">Singularity</a> or <a href="https://spack.io/">Spack</a>, which are more targeted toward high
performance computing users that have specific needs</li>
<li style="margin-bottom:0;"><a href="https://singularity.lbl.gov/">Singularity</a> or <a href="https://spack.io/">Spack</a>, which are more targeted toward the specific
needs of high performance computing users</li>
<li style="margin-bottom:0;"><a href="https://www.gnu.org/software/guix/">Guix</a>, <a href="https://nixos.org/">Nix</a> that are very clean (perfect?) solutions to this
dependency hell and which we recommend</li>
</ul></li>
......@@ -133,9 +133,9 @@ Hinsen on Active Papers</a> (<a href="http://www.activepapers.org/">http://www.a
</p>
</div>
</div>
<div id="outline-container-orgf7cdbe6" class="outline-3">
<h3 id="orgf7cdbe6">Preservation/Archiving</h3>
<div class="outline-text-3" id="text-orgf7cdbe6">
<div id="outline-container-orgade769d" class="outline-3">
<h3 id="orgade769d">Preservation/Archiving</h3>
<div class="outline-text-3" id="text-orgade769d">
<p>
Ensuring software is properly archived, i.e, is safely stored so that
it can be accessed in a perennial way, can be quite tricky. If you
......@@ -145,15 +145,15 @@ project</a>, this is a must see. <a href="https://www.softwareheritage.org/">htt
<p>
For regular data, we highly recommend using <a href="https://www.zenodo.org/">https://www.zenodo.org/</a>
whenever data is not sensitive.
whenever the data is not sensitive.
</p>
</div>
</div>
<div id="outline-container-orgf05af7d" class="outline-3">
<h3 id="orgf05af7d">Workflows</h3>
<div class="outline-text-3" id="text-orgf05af7d">
<div id="outline-container-org2c58237" class="outline-3">
<h3 id="org2c58237">Workflows</h3>
<div class="outline-text-3" id="text-org2c58237">
<p>
In the video sequences, we mentioned workflows (original domain in parenthesis):
In the video sequences, we mentioned workflow managers (original application domain in parenthesis):
</p>
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="https://galaxyproject.org/">Galaxy</a> (genomics), <a href="https://kepler-project.org/">Kepler</a> (ecology), <a href="https://taverna.apache.org/">Taverna</a> (bio-informatics), <a href="https://pegasus.isi.edu/">Pegasus</a>
......@@ -172,12 +172,12 @@ Bio-informatics: Current Status, Solutions and Research Opportunities
</div>
</div>
<div id="outline-container-orgb096e6a" class="outline-3">
<h3 id="orgb096e6a">Numerical and statistical issues</h3>
<div class="outline-text-3" id="text-orgb096e6a">
<div id="outline-container-org5e60f39" class="outline-3">
<h3 id="org5e60f39">Numerical and statistical issues</h3>
<div class="outline-text-3" id="text-org5e60f39">
<p>
These topics could only be mentioned in our MOOC but could by no way
be properly covered. We only suggest here a few interesting talks
We have mentioned these topics in our MOOC but we could by no way
cover them properly. We only suggest here a few interesting talks
about this.
</p>
<ul class="org-ul">
......@@ -190,16 +190,16 @@ reproducibility and present recent research work on this topic.</a></li>
</ul>
</div>
</div>
<div id="outline-container-org54e139e" class="outline-3">
<h3 id="org54e139e">Publication practices</h3>
<div class="outline-text-3" id="text-org54e139e">
<div id="outline-container-orgf8363e1" class="outline-3">
<h3 id="orgf8363e1">Publication practices</h3>
<div class="outline-text-3" id="text-orgf8363e1">
<p>
You may want to have a look at the following two webinars:
</p>
<ul class="org-ul">
<li style="margin-bottom:0;"><a href="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
<i>artifact evaluation</i> that are becoming more and more popular.</li>
<i>artifact evaluation</i> that is becoming more and more popular.</li>
<li style="margin-bottom:0;"><a href="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 <a href="http://rescience.github.io/">ReScience
journal</a> initiative are presented.</li>
......@@ -210,13 +210,13 @@ p-hacking, etc.</li>
</ul>
</div>
</div>
<div id="outline-container-orge4a456d" class="outline-3">
<h3 id="orge4a456d">Experimentation</h3>
<div class="outline-text-3" id="text-orge4a456d">
<div id="outline-container-org9cba5c9" class="outline-3">
<h3 id="org9cba5c9">Experimentation</h3>
<div class="outline-text-3" id="text-org9cba5c9">
<p>
Experimentation was not covered in this MOOC whereas it is an
Experimentation was not covered in this MOOC, although it is an
essential part of science. The main reason is that practices and
constraints can vary so wildly from a domain to an other that it could
constraints can vary so wildly from one domain to another that it could
not be properly covered in a first edition. We would be happy to
gather references you consider as interesting in your domain so do not
hesitate to provide us with such references by using the forum and we
......@@ -230,13 +230,13 @@ Science</a>.</li>
</div>
</div>
</div>
<div id="outline-container-orge6151d1" class="outline-2">
<h2 id="orge6151d1">Tracking environment information</h2>
<div class="outline-text-2" id="text-orge6151d1">
<div id="outline-container-org55a5ab5" class="outline-2">
<h2 id="org55a5ab5">Tracking environment information</h2>
<div class="outline-text-2" id="text-org55a5ab5">
</div>
<div id="outline-container-org3df90dc" class="outline-3">
<h3 id="org3df90dc">Getting information about your Git repository</h3>
<div class="outline-text-3" id="text-org3df90dc">
<div id="outline-container-orgf3b1e93" class="outline-3">
<h3 id="orgf3b1e93">Getting information about your Git repository</h3>
<div class="outline-text-3" id="text-orgf3b1e93">
<p>
When taking notes, it may be difficult to remember which version of
the code or of a file was used. This is what version control is useful
......@@ -295,7 +295,7 @@ new directories it did not previously know about.</i>
</p>
<p>
Then, I often include commands at the end of my notebook indicating
Then, we often include commands at the end of our notebook indicating
how to commit the results (adding the new files, committing with a
clear message and pushing). E.g.,
</p>
......@@ -327,13 +327,13 @@ is the price to pay for running git from within the notebook itself.
</p>
</div>
</div>
<div id="outline-container-orgf947c9a" class="outline-3">
<h3 id="orgf947c9a">Getting information about Python(3) libraries</h3>
<div class="outline-text-3" id="text-orgf947c9a">
<div id="outline-container-org6d7f695" class="outline-3">
<h3 id="org6d7f695">Getting information about Python(3) libraries</h3>
<div class="outline-text-3" id="text-org6d7f695">
</div>
<div id="outline-container-org606d1d6" class="outline-4">
<h4 id="org606d1d6">Getting the list of installed packages and their version</h4>
<div class="outline-text-4" id="text-org606d1d6">
<div id="outline-container-org546bbcf" class="outline-4">
<h4 id="org546bbcf">Getting the list of installed packages and their version</h4>
<div class="outline-text-4" id="text-org546bbcf">
<p>
This topic is discussed on <a href="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
......@@ -343,7 +343,7 @@ versions of Python are available on your machine
</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:
</p>
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-shell">pip3 freeze
......@@ -441,13 +441,13 @@ Requires: patsy, pandas
</pre>
</div>
</div>
<div id="outline-container-orgcba198d" class="outline-4">
<h4 id="orgcba198d">How to list imported modules?</h4>
<div class="outline-text-4" id="text-orgcba198d">
<div id="outline-container-org88ff00d" class="outline-4">
<h4 id="org88ff00d">How to list imported modules?</h4>
<div class="outline-text-4" id="text-org88ff00d">
<p>
Without resorting to pip (that will list all available packages), you
may want to know which modules are loaded in a Python session as well
as their version. Inspiring from <a href="https://stackoverflow.com/questions/4858100/how-to-list-imported-modules">StackOverflow</a>, here is a simple
as their version. Inspired by <a href="https://stackoverflow.com/questions/4858100/how-to-list-imported-modules">StackOverflow</a>, here is a simple
function that lists loaded package (that have a <code>__version__</code> attribute,
which is unfortunately not completely standard).
</p>
......@@ -455,9 +455,11 @@ which is unfortunately not completely standard).
<div class="org-src-container">
<pre style="padding-left: 30px; background-color: #f6f8fa;" class="src src-python"><span style="font-weight: bold;">def</span> <span style="font-weight: bold;">print_imported_modules</span>():
<span style="font-weight: bold;">import</span> sys
<span style="font-weight: bold;">for</span> name,val <span style="font-weight: bold;">in</span> <span style="font-weight: bold;">sorted</span>(sys.modules.items()):
<span style="font-weight: bold;">for</span> name, val <span style="font-weight: bold;">in</span> <span style="font-weight: bold;">sorted</span>(sys.modules.items()):
<span style="font-weight: bold;">if</span>(<span style="font-weight: bold;">hasattr</span>(val, <span style="font-style: italic;">'__version__'</span>)):
<span style="font-weight: bold;">print</span>(val.<span style="font-weight: bold;">__name__</span>, val.__version__)
<span style="font-weight: bold;">else</span>
<span style="font-weight: bold;">print</span>(val.<span style="font-weight: bold;">__name__</span>, <span style="font-style: italic;">"(unknown version)"</span>)
<span style="font-weight: bold;">print</span>(<span style="font-style: italic;">"**** Package list in the beginning ****"</span>);
print_imported_modules()
......@@ -504,9 +506,9 @@ zlib 1.0
</div>
</div>
<div id="outline-container-org5cafa9a" class="outline-4">
<h4 id="org5cafa9a">Setting up an environment with pip</h4>
<div class="outline-text-4" id="text-org5cafa9a">
<div id="outline-container-org8d6c94f" class="outline-4">
<h4 id="org8d6c94f">Saving and restoring an environment with pip</h4>
<div class="outline-text-4" id="text-org8d6c94f">
<p>
The easiest way to go is as follows:
</p>
......@@ -523,9 +525,9 @@ dynamic libraries that are wrapped by Python though.
</p>
</div>
</div>
<div id="outline-container-org151cce9" class="outline-4">
<h4 id="org151cce9">Installing a new package or a specific version</h4>
<div class="outline-text-4" id="text-org151cce9">
<div id="outline-container-org1fdfaf0" class="outline-4">
<h4 id="org1fdfaf0">Installing a new package or a specific version</h4>
<div class="outline-text-4" id="text-org1fdfaf0">
<p>
The Jupyter environment we deployed on our servers for the MOOC is
based on the version 4.5.4 of Miniconda and Python 3.6. In this
......@@ -592,13 +594,13 @@ It is even possible to install a specific (possibly much older) version, e.g.,:
</div>
</div>
</div>
<div id="outline-container-orgaf9f6bf" class="outline-3">
<h3 id="orgaf9f6bf">Getting information about R libraries</h3>
<div class="outline-text-3" id="text-orgaf9f6bf">
<div id="outline-container-org71f6171" class="outline-3">
<h3 id="org71f6171">Getting information about R libraries</h3>
<div class="outline-text-3" id="text-org71f6171">
</div>
<div id="outline-container-org60a17ce" class="outline-4">
<h4 id="org60a17ce">Getting the list imported modules and their version</h4>
<div class="outline-text-4" id="text-org60a17ce">
<div id="outline-container-org21ba69e" class="outline-4">
<h4 id="org21ba69e">Getting the list imported modules and their version</h4>
<div class="outline-text-4" id="text-org21ba69e">
<p>
The best way seems to be to rely on the <code>devtools</code> package (if this
package is not installed, you should install it first by running in <code>R</code>
......@@ -661,14 +663,14 @@ Packages ----------------------------------------------------------------------
<p>
Some actually advocate that <a href="https://github.com/ropensci/rrrpkg">writing a reproducible research compendium
can be done by writing an R package</a>. Those of you willing to have a
is best done by writing an R package</a>. Those of you willing to have a
clean R dependency management should thus have a look at <a href="https://rstudio.github.io/packrat/">Packrat</a>.
</p>
</div>
</div>
<div id="outline-container-org05bd133" class="outline-4">
<h4 id="org05bd133">Getting the list of installed packages and their version</h4>
<div class="outline-text-4" id="text-org05bd133">
<div id="outline-container-orgdbb0731" class="outline-4">
<h4 id="orgdbb0731">Getting the list of installed packages and their version</h4>
<div class="outline-text-4" id="text-orgdbb0731">
<p>
Finally, it is good to know that there is a built-in R command
(<code>installed.packages</code>) allowing to retrieve and list the details of all
......@@ -923,19 +925,19 @@ packages installed.
</div>
</div>
<div id="outline-container-orga08b912" class="outline-4">
<h4 id="orga08b912">Installing a new package or a specific version</h4>
<div class="outline-text-4" id="text-orga08b912">
<div id="outline-container-org1110f15" class="outline-4">
<h4 id="org1110f15">Installing a new package or a specific version</h4>
<div class="outline-text-4" id="text-org1110f15">
<p>
This section is mostly a cut and paste from the <a href="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.
</p>
</div>
<ul class="org-ul">
<li style="margin-bottom:0;"><a id="org5abc570"></a>Installing a pre-compiled version<br />
<div class="outline-text-5" id="text-org5abc570">
<li style="margin-bottom:0;"><a id="orgdf03a57"></a>Installing a pre-compiled version<br />
<div class="outline-text-5" id="text-orgdf03a57">
<p>
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
......@@ -959,8 +961,8 @@ install.packages(packageurl, repos=<span style="font-weight: bold; text-decorati
</div>
</div>
</li>
<li style="margin-bottom:0;"><a id="orgb7f0ef5"></a>Using devtools<br />
<div class="outline-text-5" id="text-orgb7f0ef5">
<li style="margin-bottom:0;"><a id="orgc4b1a0b"></a>Using devtools<br />
<div class="outline-text-5" id="text-orgc4b1a0b">
<p>
The simplest method to install the version you need is to use the
<code>install_version()</code> function of the <code>devtools</code> package (obviously, you
......@@ -975,11 +977,12 @@ install_version(<span style="font-style: italic;">"ggplot2"</span>, version = <s
</div>
</div>
</li>
<li style="margin-bottom:0;"><a id="org35a1a41"></a>Alternatively, you may want to install an older package from source<br />
<div class="outline-text-5" id="text-org35a1a41">
<li style="margin-bottom:0;"><a id="org6f6cbcb"></a>Installing from source code<br />
<div class="outline-text-5" id="text-org6f6cbcb">
<p>
If you devtools fails or if you do not want to depend on it, you can
install it from source via <code>install.packages()</code> directed to the right
Alternatively, you may want to install an older package from source If
devtools fails or if you do not want to depend on it, you can install
it from source via <code>install.packages()</code> directed using the right
URL. This URL can be obtained by browsing the <a href="https://cran.r-project.org/src/contrib/Archive">CRAN Package Archive</a>.
</p>
......@@ -1004,8 +1007,8 @@ R CMD INSTALL ggplot2_0.9.1.tar.gz
</div>
</div>
</li>
<li style="margin-bottom:0;"><a id="org0084fa8"></a>Potential issues<br />
<div class="outline-text-5" id="text-org0084fa8">
<li style="margin-bottom:0;"><a id="org69510d5"></a>Potential issues<br />
<div class="outline-text-5" id="text-org69510d5">
<p>
There are a few potential issues that may arise with installing older
versions of packages:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment