RStudio Reticulated Python
Written by Kay Ewbank   
Thursday, 11 October 2018

The latest version of RStudio has improved support with a number of programming languages and platforms, including SQL, D3, Python, Stan, and C++. The Python support comes via a reticulate package that provides an interface to Python.

rstudiobanner

The package lets you reticulate Python code into R, creating a new breed of project that makes use of both languages. You can embed a Python session within an R process, meaning you can import Python modules and call their functions directly from R. RStudio v1.2 now has support for executing reticulated Python chunks within R Notebooks, and you can execute Python code line-by-line. Python objects all exist in a single persistent session so are usable across chunks just like R objects. R and Python objects are also shared across languages with conversions done automatically when required;  Matplotlib plots can be displayed within both notebook and console execution modes; and you get code completion and inline help for Python.

 

rmarkdown reticulate matplotlib

 

The developers of RStudio aren't suggesting you move to RStudio for projects that are Python-only, but if you are using reticulated Python within an R project then RStudio provides a useful set of tools. 

Away from Python, you can now create and preview D3 visualizations and embed them in R Notebooks. There's also improved support for SQL, so you can create, run and preview SQL query results. New testing tool support means you can run testthat and shinytest tests and view results. You can also view PowerPoint presentations in R Markdown. There's better integration with a number of packages, including the keyring package for storing passwords; and the Plumber package for converting existing R code to a web API using a handful of special one-line comments. You can also now run R scripts in the background, view progress and output, and collect results when complete. 

rstud

More Information

RStudio Preview

Related Articles

RStudio Adds Object Explorer

RStudio Improves Connections

RStudio Adds SparklyR Support

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Ursina - A Game Engine Powered by Python
08/11/2024

Ursina is a new open source game engine in which you can code any type of game in Python, be it 2-D, 3-D, an application, a visualization, you name it.



Microsoft Introduces Vector Abstractions Library For .NET
21/11/2024

Microsoft has announced a preview release of the Microsoft Extensions VectorData Abstractions library, which can be used to help integrate vector stores into .NET applications and libraries.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info