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


White House Urges Memory Safe Software
29/02/2024

The White House is urging developers to adopt memory safe programming languages, suggesting Rust would be a safer choice than C or C++. 



TypeScript 5.4 Adds NoInfer Type
12/03/2024

TypeScript 5.4 has been released, with the addition of a NoInfer utility type alongside preserved narrowing in closures following last assignments. 


More News

raspberry pi books

 

Comments




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