{"id":13857471,"url":"https://github.com/cwickham/purrr-tutorial","last_synced_at":"2025-04-13T08:21:51.980Z","repository":{"id":66634262,"uuid":"78949653","full_name":"cwickham/purrr-tutorial","owner":"cwickham","description":"A introduction to purrr","archived":false,"fork":false,"pushed_at":"2017-06-26T21:27:38.000Z","size":8815,"stargazers_count":250,"open_issues_count":0,"forks_count":79,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-27T00:11:09.398Z","etag":null,"topics":["purrr","r","rstats","training","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cwickham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-01-14T15:54:46.000Z","updated_at":"2025-03-22T22:21:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"1369a240-2853-4bae-b676-bf8e29476f43","html_url":"https://github.com/cwickham/purrr-tutorial","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Fpurrr-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Fpurrr-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Fpurrr-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cwickham%2Fpurrr-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cwickham","download_url":"https://codeload.github.com/cwickham/purrr-tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681654,"owners_count":21144730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["purrr","r","rstats","training","tutorial"],"created_at":"2024-08-05T03:01:38.129Z","updated_at":"2025-04-13T08:21:51.957Z","avatar_url":"https://github.com/cwickham.png","language":"R","readme":"# A purrr tutorial\n\nThis repo hosts the materials for a [purrr](http://purrr.tidyverse.org/) tutorial.  The materials currently reflect the version planned for the useR! Brussels, Belgium, July 2017.\n\n## Upcoming in-person tutorials\n\n* [useR!](https://user2017.brussels/) Brussels, Belgium, July 4 2017\n* [London R-ladies](https://www.meetup.com/rladies-london/) London, U.K., July 12 2017 \n\nOlder versions of the materials, from prior in-person tutorials, are also available:\n\n* [Cascadia R Conf June 3 2017 (1.75 hours)](https://github.com/cwickham/purrr-tutorial/tree/v0.2) \n\n* [rstudio::conf Jan 2017 (2.25 hours)](https://github.com/cwickham/purrr-tutorial/tree/v0.1)\n\n\n## Outline\n\nCode with a lot of duplication is harder to understand, troubleshoot and maintain. The goal of this tutorial is help you remove duplication in your code by using functions that write `for` loops for you.\n\nYou'll learn to use the functions in the `purrr` package to perform iterative tasks: tasks that look like \"for each _____ do _____\".\n\nBy the end of the tutorial you'll be writing code that is more readable and easier to update and you'll be ready to solve new iteration problems faster and with fewer mistakes.\n\n## Learning Objectives\n\nBy the end of the tutorial, you'll be able to:\n\n* Move from solving a problem on a single element, to iterating that solution over many elements with `map()`.\n* Identify when to use the typed variants of `map()`: `map_lgl()`, `map_int()`, `walk()` etc.\n* Iterate over two arguments with `map2()`.\n* Leverage `purrr` to get list data into tibbles.\n* Use `purrr` to work with list columns in tibbles.\n\n## Pre-requisites\n\nDon't worry if you have never written a `for` loop, used `lapply()`, written your own function or heard of a `tibble`, this tutorial is designed to be accessible to beginners.  \n\nThat said, you should be familiar with exploring and subsetting the basic data structures in R including lists and data frames. \n\nThis is a hands-on tutorial, you'll need your laptop with R installed, as well as a few packages:\n\n```{r}\ninstall.packages(\"tidyverse\")\n\n# install.packages(\"devtools\")\ndevtools::install_github(\"jennybc/repurrrsive\")\n```\n\n## License\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/4.0/\"\u003e\u003cimg alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc/4.0/80x15.png\" /\u003e\u003c/a\u003e\u003cbr /\u003eThis \u003cspan xmlns:dct=\"http://purl.org/dc/terms/\" property=\"dct:title\"\u003epurrr tutorial\u003c/span\u003e by \u003ca xmlns:cc=\"http://creativecommons.org/ns#\" href=\"https://github.com/cwickham/purrr-tutorial\" property=\"cc:attributionName\" rel=\"cc:attributionURL\"\u003eCharlotte Wickham\u003c/a\u003e is licensed under a \u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/4.0/\"\u003eCreative Commons Attribution-NonCommercial 4.0 International License\u003c/a\u003e.\n","funding_links":[],"categories":["R"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwickham%2Fpurrr-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcwickham%2Fpurrr-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcwickham%2Fpurrr-tutorial/lists"}