10000 GitHub - rmontellano2022/R-functional-programming: The joy and power of functional programming in R
[go: up one dir, main page]

Skip to content

rmontellano2022/R-functional-programming

 
 

Repository files navigation

D-Lab R Functional Programming

This is the repository for D-Lab's introductory Python-Fundamentals workshop series. Laptop, Internet connection, and Zoom account required.

by Jae Yeon Kim File an issue if you have problems, questions or suggestions.

Overview

This workshop helps you to step up your R skills with functional programming. The purrr package provides easy-to-use tools to automate repeated things in your entire R workflow (e.g., wrangling, modeling, and visualization). The end result is cleaner, faster, more readable and extendable code. I highly recommend you to take this workshop (1) if you still write copy-and-paste code, (2) exclusively rely on for loops for automation, and (3) want to know about the joy and power of R functional programming.

Learning objectives

  1. How to use purrr to automate workflow in a cleaner, faster, and more extendable way [Notebook]

  2. How to use map2() and pmap() to avoid writing nested loops. [Notebook]

  3. How to use map() and glue() to automate creating multiple plots [Notebook]

  4. How to use reduce() to automate joining multiple dataframes [Notebook]

  5. How to use slowly() and future_ to make automation process either slower or faster [Notebook]

  6. How to use safely() and possibly() to make error handling easier [Notebook]

Prerequisites

  • Some experience with writing functions in R

Setup

Launch the Binder. Please do so before attending the worskshop as it would take a while (especially, if you do it for the first time).


About the UC Berkeley D-Lab

D-Lab works with Berkeley faculty, research staff, and students to advance data-intensive social science and humanities research. Our goal at D-Lab is to provide practical training, staff support, resources, and space to enable you to use R for your own research applications. Our services cater to all skill levels and no programming, statistical, or computer science backgrounds are necessary. We offer these services in the form of workshops such as R Fundamentals, one-to-one consulting, and working groups that cover a variety of research topics, digital tools, and programming languages.

Visit the D-Lab homepage to learn more about us. View our calendar for upcoming events, and also learn about how to utilize our consulting and data services.

(include definition of IOKN2K!)

Other D-Lab Python Workshops

Check out the D-Lab Computational Text Analysis Working Group by clicking here

Basic competency

Intermediate/advanced copmetency

Legacy workshops (need updating)


Contributors

  • [Contributor A](link to D-Lab bio)
  • [Contributor B](link to D-Lab bio)
  • Much of the Python-Fundamentals materials were adapted from those produced by Software Carpentry. Thank you!

This work is licensed under a Creative Commons Attribution 4.0 International License.


D-Lab @ University of California - Berkeley
https://dlab.berkeley.edu
 

About

The joy and power of functional programming in R

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 100.0%
0