setup Jupyter for Python but with R analysis

parent 77edd33e
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 4
}
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 4
}
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 4
}
...@@ -9,6 +9,67 @@ ...@@ -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." "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", "cell_type": "code",
"execution_count": null, "execution_count": null,
......
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