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


Eclipse IoT Developer Survey 2024
04/12/2024

The Eclipse Foundation’s IoT Working Group has released the results of its 2024 IoT Developer Survey. Industrial automation and automotive are now the leading industry sectors and connectivity is th [ ... ]



The Advent of SQL 2024 Has Commenced
11/12/2024

It's Advent - the time of year when we countdown the days to Christmas - and if your are a programmer complete daily coding challenges with the Advent of Code, the Advent of Perl, the Advent of Java,  [ ... ]


More News

espbook

 

Comments




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