Converting Notebooks to R
Again, this section corresponds to the language choice in use for the Notebook. The choice downloads an R file from Jupyter to your machine.
How to do it...
You are on the Notebook in Jupyter. Selecting the choice will prompt for a location and then Jupyter will extract the Notebook code to the location specified using a filename containing the title of the Notebook with an R extension. In this case, the file was named B09656_07+r+iris+for+conversions.r
, where I had titled the Notebook B09656_07 r iris for conversions
.
How it works...
- We can open the downloaded R script, and we have just the R script in the Notebook:
![](https://static.packt-cdn.com/products/9781788839440/graphics/08948ac5-af0c-41f6-8e9d-d5b9e1bca811.png)
- So, as it is a good R script, we can run it. I had already installed Anaconda with the corresponding R Studio. So, I ran the script in R studio with the expected result:
![](https://static.packt-cdn.com/products/9781788839440/graphics/d2f29bfa-7c7d-43cc-bdcc-4801984c2cad.png)
- The graphic is in a pop-up window for R Studio:
![](https://static.packt-cdn.com/products/9781788839440/graphics/64af257a-8314-4fe8-8837-68498741b6cb.png)