152 search results for "purrr"

Getting data for every Census tract in the US with purrr and tidycensus

May 31, 2017
By

Interested in more tips on working with Census data? Click here to join my email list! Last week, I published the development version of my new R package, tidycensus. You can read through the documentation and some examples at https://walkerke.github.io/tidycensus/. I’m working on getting the package CRAN-ready with better error handling; in the meantime, I’m...

Read more »

Make ggplot2 purrr

Make ggplot2 purrr

I’ll be honest: the title is a bit misleading. I will not use purrr that much in this blog post. Actually, I will use one single purrr function, at the very end. I use dplyr much more. However Make ggplot2 purrr sounds better than Make ggplot dplyr or whatever the verb for dplyr would be. Also, this blog post was...

Read more »

Lesser known purrr tricks

purrr is a package that extends R’s functional programming capabilities. It brings a lot of new stuff to the table and in this post I show you some of the most useful (at least to me) functions included in purrr. Getting rid of loops with map() library(purrr) numbers <- list(11, 12, 13, 14) map_dbl(numbers, sqrt) ## 3.316625 3.464102...

Read more »

Lesser known purrr tricks

purrr is package that extends R’s functional programming capabilities. It brings a lot of new stuff to the table and in this post I show you some of the most useful (at least to me) functions included in purrr. Getting rid of loops with map() library(purrr) numbers <- list(11, 12, 13, 14) map_dbl(numbers, sqrt) ## 3.316625 3.464102 3.605551...

Read more »

Fantasy Hockey with rvest and purrr

January 7, 2017
By
Fantasy Hockey with rvest and purrr

(This article was first published on max humber, and kindly contributed to R-bloggers) rvest and purrr are wonderful bedfellows. The packages share the underlying tidyverse API. And it feels simple and almost natural to combine them when scraping the web. Here is a slimmed down and worked recipe of how to leverage rvest and purrr in Fantasy Hockey. Step...

Read more »

U.S. Drought Animations with the “Witch’s Brew” (purrr + broom + magick)

July 27, 2016
By
U.S. Drought Animations with the “Witch’s Brew” (purrr + broom + magick)

This is another purrr-focused post but it’s also an homage to the nascent magick package (R interface to ImageMagick) by @opencpu. We’re starting to see/feel the impact of the increasing drought up here in southern Maine. I’ve used the data from the U.S. Drought Monitor before on the blog, but they also provide shapefiles and... Continue reading...

Read more »

Use quick formula functions in purrr::map (+ base vs tidtyverse idiom comparisons/examples)

July 26, 2016
By

I’ve converted the vast majority of my *apply usage over to purrr functions. In an attempt to make this a quick post, I’ll refrain from going into all the benefits of the purrr package. Instead, I’ll show just one thing that’s super helpful: formula functions. After seeing this Quartz article using a visualization to compare... Continue reading...

Read more »

The Power of (purrr,tidy,broom)-Exploring Climate Change Trends

June 27, 2016
By
The Power of (purrr,tidy,broom)-Exploring Climate Change Trends

Few days ago, I wanted to explore the Climate Change: Earth Surface Temperature Data dataset published on Kaggle and originally compiled by Berkeley Earth. The dataset is relatively large as it contains entries from 1750-2014!

Read more »

purrr 0.2.0

January 6, 2016
By
purrr 0.2.0

I’m pleased to announce purrr 0.2.0. Purrr fills in the missing pieces in R’s functional programming tools, and is designed to make your pure (and now) type-stable functions purrr. I’m still working out exactly what purrr should do, and how it compares to existing functions in base R, dplyr, and tidyr. One main insight that

Read more »

Using purrr with dplyr

October 7, 2015
By

purrr was finally released on CRAN last week. This package is focused on working with lists (and data frames by the same token). However it is not a DSL for lists in the way dplyr is a DSL for data frames. It aims at creating a "better standard lib" focused on functional programming. Purrr should feel like R programming and bring out the elegance...

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)