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


DuckDB And Hydra Partner To Get DuckDB Into PostgreSQL
11/11/2024

The offspring of that partnership is pg_duckdb, an extension that embeds the DuckDB engine into the PostgreSQL database, allowing it to handle analytical workloads.



OpenAI Releases Swarm
25/10/2024

OpenAI has released an experimental educational framework for exploring ergonomic, lightweight multi-agent orchestration. Swarm is managed by the OpenAI Solution team, but is not intended to be used i [ ... ]


More News

espbook

 

Comments




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