{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Document d'essai" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 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": 1, "metadata": {}, "outputs": [], "source": [ "# En Python\n", "Totoche = 25" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "25" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "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": [ "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": 5, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "UsageError: Line magic function `%%R` not found.\n" ] } ], "source": [ "# En R\n", "%load_ext rpy2.ipython\n", "%%R\n", "plot(cars)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }