diff --git a/module2/exo4/Untitled.ipynb b/module2/exo4/Untitled.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..7fec51502cbc3200b3d0ffc6bbba1fe85e197f3d --- /dev/null +++ b/module2/exo4/Untitled.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/module2/exo4/Untitled1.ipynb b/module2/exo4/Untitled1.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..7fec51502cbc3200b3d0ffc6bbba1fe85e197f3d --- /dev/null +++ b/module2/exo4/Untitled1.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/module2/exo4/Untitled2.ipynb b/module2/exo4/Untitled2.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..7fec51502cbc3200b3d0ffc6bbba1fe85e197f3d --- /dev/null +++ b/module2/exo4/Untitled2.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/module2/exo4/exercice.ipynb b/module2/exo4/exercice.ipynb index fab4a735cdcf04603e193845a9d1467b4f6d7d90..30585a99245b104cebb827c26da27d539cd283e5 100644 --- a/module2/exo4/exercice.ipynb +++ b/module2/exo4/exercice.ipynb @@ -9,6 +9,67 @@ "I've tracked my sleep for a few days, about its quality and length, to have statistics and analyze this data." ] }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "%load_ext rpy2.ipython" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + " Date BeginningTime Length AwakeningReason\n", + " 2023-10-18:2 1:00:00 :1 1:42:00 :1 AlarmClock :3 \n", + " 2023-10-19:2 1:10:00 :1 17:10:00:1 AlarmMissed:1 \n", + " 2023-10-20:1 1:28:00 :1 5:02:00 :1 Natural :1 \n", + " 16:15:00:1 6:20:00 :1 \n", + " 18:45:00:1 8:00:00 :1 \n", + " Feeling \n", + " NotVeryRested:1 \n", + " QuiteRested :1 \n", + " Rested :3 \n", + " \n", + " \n" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%R\n", + "data = read.csv('data.csv') # Read data\n", + "summary(data)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[1] NA\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%R\n", + "mean(data$Length)" + ] + }, { "cell_type": "code", "execution_count": null,