diff --git a/module2/ressources/jupyter.html b/module2/ressources/jupyter.html index 252e1db2631313566eb54c3bc7898985bbd87dc2..b47162eb26e37e3d60243e88a5fb5a0ef53e2242 100644 --- a/module2/ressources/jupyter.html +++ b/module2/ressources/jupyter.html @@ -4,34 +4,34 @@
The following webpage lists several Jupyter tricks (in particular, it
illustrates many Ipython magic
commands) that should improve your
@@ -41,9 +41,9 @@ now).
The best solution to this is to install rpy2. On my machine, I have
installed the python3-rpy2
debian package with apt-get install
. An
@@ -74,20 +74,20 @@ summary(cars)
-Python objects can then even be passed to R as follows (assuming df
-is a pandas dataframe:
+Python objects can then even be passed to R as follows (assuming df
+is a pandas dataframe):
%%R -i df -plot((df) +plot(df)
Obviously, you can convert to html or pdf using the using the File >
Download as > HTML
(or PDF
) menu option. This can also be done from
@@ -114,13 +114,13 @@ taste.
Here is what you should install:
@@ -151,16 +151,15 @@ The ipython notebook can then be run with the following command:-If you also want to have the R kernel in jupyter, follow these -instructions. +If you want to use the R kernel in jupyter, follow these instructions.
-Alternatively, you can install rpy2
(see the Running R and Python in
+Alternatively, you can install rpy2
(see the Running R and Python in
the same notebook section).
-Here is what I had to install to make sure the notebook export via -latex works: +Here is what I had to install on my recent debian machine to make sure +the notebook export via latex works:
sudo apt-get install wkhtmltopdf @@ -183,9 +182,9 @@ sudo apt-get install texlive-xetex
Here is our jupyter extension that allows to git push/pull from the notebooks: @@ -197,9 +196,9 @@ jupyter nbextension enable nb-git
Here are two interesting extensions that can improve readability:
@@ -226,9 +225,9 @@ jupyter-serverextension enable --py hide_codeBenoit may give a few hints on this. diff --git a/module2/ressources/jupyter.org b/module2/ressources/jupyter.org index c4b807be6fe1a41808f95a25a17f726a89d14af0..040e86cb18810ad6dd768ed3aad89cce647697f3 100644 --- a/module2/ressources/jupyter.org +++ b/module2/ressources/jupyter.org @@ -31,11 +31,11 @@ Then you'll be able to use both languages in the same notebook by: %R summary(cars) #+end_src - Python objects can then even be passed to R as follows (assuming df - is a pandas dataframe: + Python objects can then even be passed to R as follows (assuming =df= + is a pandas dataframe): #+begin_src python :results output :exports both %%R -i df - plot((df) + plot(df) #+end_src ** Exporting a notebook Obviously, you can convert to html or pdf using the using the =File > @@ -74,8 +74,7 @@ The ipython notebook can then be run with the following command: jupyter-notebook #+end_src ** Using R -If you also want to have the R kernel in jupyter, follow [[https://github.com/IRkernel/IRkernel#installation][these -instructions]]. +If you want to use the R kernel in jupyter, follow [[https://github.com/IRkernel/IRkernel#installation][these instructions]]. Alternatively, you can install =rpy2= (see the [[*Running R and Python in the same notebook][Running R and Python in the same notebook]] section). @@ -83,8 +82,8 @@ the same notebook]] section). sudo apt-get python3-rpy2 #+end_src ** Exporting your notebooks with latex -Here is what I had to install to make sure the notebook export via -latex works: +Here is what I had to install on my recent debian machine to make sure +the notebook export via latex works: #+begin_src shell :results output :exports both sudo apt-get install wkhtmltopdf sudo apt-get install texlive-xetex