{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "library(JuliaCall)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Julia version 1.0.0 at location /Applications/Julia-1.0.app/Contents/Resources/julia/bin will be used.\n", "Loading setup script for JuliaCall...\n", "Finish loading setup script for JuliaCall.\n" ] } ], "source": [ "julia_setup()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "It seems that you are not in the terminal. A simple julia console will be started.\n", "Type exit and then enter to exit.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "julia> sqrt(2)\n" ] }, { "data": { "text/html": [ "1.4142135623730951" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "julia> exit\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "Exiting julia console.\n" ] } ], "source": [ "julia_console()" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "julia_library(\"Plots\")" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Plots.GRBackend()" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "julia_command(\"gr()\")" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "\n", " \n", " \n", " \n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "0\n", "\n", "\n", "10\n", "\n", "\n", "20\n", "\n", "\n", "30\n", "\n", "\n", "40\n", "\n", "\n", "50\n", "\n", "\n", "-5.0\n", "\n", "\n", "-2.5\n", "\n", "\n", "0.0\n", "\n", "\n", "2.5\n", "\n", "\n", "5.0\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "y1\n", "\n", "\n", "\n", "y2\n", "\n", "\n", "\n", "y3\n", "\n", "\n", "\n", "y4\n", "\n", "\n", "\n", "y5\n", "\n", "\n", " " ] }, "metadata": { "text/html": { "isolated": true } }, "output_type": "display_data" } ], "source": [ "julia_command(\"Plots.plot(Plots.fakedata(50,5),w=3)\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "R", "language": "R", "name": "ir" }, "language_info": { "codemirror_mode": "r", "file_extension": ".r", "mimetype": "text/x-r-source", "name": "R", "pygments_lexer": "r", "version": "3.5.1" } }, "nbformat": 4, "nbformat_minor": 2 }