Connecting R to Keras and TensorFlow

It has always been the mission of R developers to connect R to the “good stuff”. As John Chambers puts it in his book Extending R: One of the attractions of R has always been the ability to compute an interesting result quickly. A key motivation for the original S remains as important now: to give easy access to the best computations for understanding data. From the day it was announced a little over two years ago, it was clear that Google’s TensorFlow platform for Deep Learning is good stuff.

Read more

Share Comments · · · · · · ·

How to Show R Inline Code Blocks in R Markdown

Inline code with R Markdown R Markdown is a well-known tool for reproducible science in R. In this article, I will focus on a few tricks with R inline code. Some time ago, I was writing a vignette for my package WordR. I was using R Markdown. At one point I wanted to show r expression in the output, exactly as it is shown here, as an inline code block.

Read more

Share Comments · ·

CVXR: An R Package for Disciplined Convex Optimization

At long last, we are pleased to announce the release of CVXR! First introduced at useR! 2016, CVXR is an R package that provides an object-oriented language for convex optimization, similar to CVX, CVXPY, YALMIP, and Convex.jl. It allows the user to formulate convex optimization problems in a natural mathematical syntax, then automatically verifies the problem’s convexity with disciplined convex programming (DCP) and converts it into the appropriate form for a specific solver.

Read more

Share Comments · · · ·

October 2017 New Packages

Of the 182 new packages that made it to CRAN in October, here are my picks for the “Top 40”. They are organized into eight categories: Engineering, Machine Learning, Numerical Methods, Science, Statistics, Time Series, Utilities and Visualizations. Engineering is a new category, and its appearance may be an early signal for the expansion of R into a new domain. The Science category is well-represented this month. I think this is the result of the continuing trend for working scientists to wrap their specialized analyses into R packages.

Read more

Share Comments · · ·

Using Shiny with Scheduled and Streaming Data

Shiny applications are often backed by fluid, changing data. Data updates can occur at different time scales: from scheduled daily updates to live streaming data and ad-hoc user inputs. This article describes best practices for handling data updates in Shiny, and discusses deployment strategies for automating data updates. This post builds off of a 2017 rstudio::conf talk. The recording of the original talk and the sample code for this post are available.

Read more

Share Comments · · · · ·

Introduction to Visualizing Asset Returns

In a previous post, we reviewed how to import daily prices, build a portfolio, and calculate portfolio returns. Today, we will visualize the returns of our individual assets that ultimately get mashed into a portfolio. The motivation here is to make sure we have scrutinized our assets before they get into our portfolio, because once the portfolio has been constructed, it is tempting to keep the analysis at the portfolio level.

Read more

Share Comments · · · · ·

Automating Summary of Surveys with RMarkdown

This guide shows how to automate the summary of surveys with R and R Markdown using RStudio. This is great for portions of the document that don’t change (e.g., “the survey shows substantial partisan polarization”). The motivation is really twofold: efficiency (maximize the reusabililty of code, minimize copying and pasting errors) and reproducibility (maximize the number of people and computers that can reproduce findings). The basic setup is to write an Rmd file that will serve as a template, and then a short R script that loops over each data file (using library(knitr)).

Read more

Share Comments · · ·

Recent R Data Packages

It has never been easier to access data from R. Not only does there seem to be a constant stream of new packages that access the APIs of data providers, but it is also becoming popular for package authors to wrap up fairly large datasets into R packages. Below are 44 R packages concerned with data in one way or another that have made it to CRAN over the past two months.

Read more

Share Comments · · ·

September 2017 New Package Picks

There were so many interesting ideas among the 222 new packages that made it to CRAN in September that I found it exceptionally difficult to decide on the “Top 40” packages. In the end, I only managed to limit my selection to 40 by avoiding all packages that I would normally classify under “Data”: packages that are primarily intended to provide access to some data source. I hope to make up for this by providing a list of data packages sometime soon.

Read more

Share Comments · · ·

The SeaClass R Package

The SeaClass R Package The Operations Technology and Advanced Analytics Group (OTAAG) at Seagate Technology has decided to share an internal project that helps accelerate development of classification models. The interactive SeaClass tool is contained in an R-based package built using shiny and other CRAN packages commonly used for binary classification. The package is free to use and develop further, but any analysis mistakes are the sole responsibility of the user.

Read more

Share Comments · · · · · · ·