Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
a6a8e0f601822270ca754f29f77749b6
mooc-rr
Commits
b6c5bd82
Commit
b6c5bd82
authored
Sep 18, 2020
by
a6a8e0f601822270ca754f29f77749b6
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deuxième version.
parent
13bd61dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
24 deletions
+68
-24
toy_notebook_fr.ipynb
module2/exo1/toy_notebook_fr.ipynb
+68
-24
No files found.
module2/exo1/toy_notebook_fr.ipynb
View file @
b6c5bd82
...
...
@@ -11,12 +11,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Completion sur noms de variables"
"## Premier groupe d'essais effectués\n",
"- Completion sur noms de variables\n",
"- Non persistance des variables et de leur état\n",
"- Colorisation du code"
]
},
{
"cell_type": "code",
"execution_count":
4
,
"execution_count":
1
,
"metadata": {},
"outputs": [],
"source": [
...
...
@@ -26,7 +29,7 @@
},
{
"cell_type": "code",
"execution_count":
5
,
"execution_count":
2
,
"metadata": {},
"outputs": [
{
...
...
@@ -35,7 +38,7 @@
"25"
]
},
"execution_count":
5
,
"execution_count":
2
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -44,35 +47,79 @@
"Totoche"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"35"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# En python\n",
"Totoche += 5\n",
"Totoche"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"En Python, les trois points fonctionnent."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tentative d'exécution de code R"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# En R\n",
"%load_ext rpy2.ipython\n",
"%%R\n",
"plot(cars)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"En Python, ça fonctionne."
"Problème pour exécuter du code R.\n",
"Tentative de résolution en exécutant la partie Python avec le kernel Python et la partie R avec le kernel R."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Exécution de code R pour vérifier la possibilité de générer des graphiques, comme sur la vidéo"
]
},
{
"cell_type": "code",
"execution_count":
3
,
"execution_count":
5
,
"metadata": {},
"outputs": [
{
"name": "std
out
",
"name": "std
err
",
"output_type": "stream",
"text": [
"The rpy2.ipython extension is already loaded. To reload it, use:\n",
" %reload_ext rpy2.ipython\n"
]
},
{
"ename": "NameError",
"evalue": "name 'plot' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-3-cc96db778659>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'load_ext'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'rpy2.ipython'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;31m#%%R\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mplot\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcars\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;31mNameError\u001b[0m: name 'plot' is not defined"
"UsageError: Line magic function `%%R` not found.\n"
]
}
],
...
...
@@ -86,10 +133,7 @@
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Problème pour exécuter du code R.\n",
"Tentative de résolution en exécutant la partie Python avec le kernel Python et la partie R avec le kernel R."
]
"source": []
}
],
"metadata": {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment