purrr - A functional programming toolkit for R

  •        12

purrr enhances Rโ€™s functional programming (FP) toolkit by providing a complete and consistent set of tools for working with functions and vectors. If youโ€™ve never heard of FP before, the best place to start is the family of map() functions which allow you to replace many for loops with code that is both more succinct and easier to read. The best place to learn about the map() functions is the iteration chapter in R for data science. The following example uses purrr to solve a fairly realistic problem: split a data frame into pieces, fit a model to each piece, compute the summary, then extract the R2.




Related Projects

tidyverse - Easily install and load packages from the tidyverse

  •    R

The tidyverse is a set of packages that work in harmony because they share common data representations and API design. The tidyverse package is designed to make it easy to install and load core packages from the tidyverse in a single command. If you’d like to learn how to use the tidyverse effectively, the best place to start is R for data science.

forcats - ๐Ÿˆ๐Ÿˆ๐Ÿˆ๐Ÿˆ: tools for working with categorical variables (factors)

  •    R

R uses factors to handle categorical variables, variables that have a fixed and known set of possible values. Historically, factors were much easier to work with than character vectors, so many base R functions automatically convert character vectors to factors. (For historical context, I recommend stringsAsFactors: An unauthorized biography by Roger Peng, and stringsAsFactors = <sigh> by Thomas Lumley. If you want to learn more about other approaches to working with factors and categorical data, I recommend Wrangling categorical data in R, by Amelia McNamara and Nicholas Horton.) These days, making factors automatically is no longer so helpful, so packages in the tidyverse never create them automatically. However, factors are still useful when you have true categorical data, and when you want to override the ordering of character vectors to improve display. The goal of the forcats package is to provide a suite of useful tools that solve common problems with factors. If you’re not familiar with strings, the best place to start is the chapter on factors in R for Data Science.

tidyquant - Bringing financial analysis to the tidyverse

  •    R

tidyquant integrates the best resources for collecting and analyzing financial data, zoo, xts, quantmod, TTR, and PerformanceAnalytics, with the tidy data infrastructure of the tidyverse allowing for seamless interaction between each. You can now perform complete financial analyses in the tidyverse. Our short introduction to tidyquant on YouTube.

modelr - Helper functions for modelling

  •    R

The modelr package provides functions that help you create elegant pipelines when modelling. It is designed primarily to support teaching the basics of modelling within the tidyverse, particularly in R for Data Science. modelr is stable: it has achieved its goal of making it easier to teach modelling within the tidyverse. For more general modelling tasks, check out the family of “tidymodel” packages like recipes, rsample, parsnip, and tidyposterior.

infer - An R package for tidyverse-friendly statistical inference

  •    R

The objective of this package is to perform statistical inference using an expressive statistical grammar that coheres with the tidyverse design framework. To install the developmental version of infer, make sure to install remotes first. The pkgdown website for this developmental version is at https://infer.netlify.com.

turbine - Purely functional frontend framework for building web applications

  •    TypeScript

A purely functional frontend framework based on functional reactive programming. Experimental. The JavaScript world is full of frameworks. So why another one? Because we want something different. We want something that is purely functional without compromises. Something that takes the best lessons from existing JavaScript frameworks and couples them with the powerful techniques found in functional languages like Haskell. We want a framework that is highly expressive. Because when functional programming is at its best it gives you more power, not less. Turbine is supposed to be approachable for typical JavaScript developers while still preserving the benefits that comes from embracing purely functional programming.

awesome-fp-js - :sunglasses: A curated list of awesome functional programming stuff in js


This is a curated list of awesome functional programming code and learning resources for JavaScript. As a multi-paradigm programming language, JavaScript can be written in many styles. With these resources we want to help you to make better use of JavaScript’s support for writing programs in a functional way. Functional programming is a style of programming which models computations as the evaluation of expressions. Contrast this with imperative programming where programs are composed of statements which change global state when executed. Functional programming typically avoids using mutable state and favors side-effect free functions and immutable data instead. This encourages writing composable and declarative programs that are easy to reason about.

cats - Lightweight, modular, and extensible library for functional programming.

  •    Scala

Cats is a library which provides abstractions for functional programming in the Scala programming language. The name is a playful shortening of the word category. Scala supports both object-oriented and functional programming, and this is reflected in the hybrid approach of the standard library. Cats strives to provide functional programming abstractions that are core, binary compatible, modular, approachable and efficient. A broader goal of Cats is to provide a foundation for an ecosystem of pure, typeful libraries to support functional programming in Scala applications.

Vavr - Object-functional language extension to Java

  •    Java

Vavr is an object-functional language extension to Java 8, which aims to reduce the lines of code and increase code quality. It provides persistent collections, functional abstractions for error handling, concurrent programming, pattern matching and much more.

tidy-text-mining - Manuscript of the book "Tidy Text Mining with R" by Julia Silge and David Robinson

  •    TeX

This is a draft of the book Text Mining with R: A Tidy Approach, by Julia Silge and David Robinson. Please note that this work is being written under a Contributor Code of Conduct and released under a CC-BY-NC-SA license. By participating in this project (for example, by submitting a pull request with suggestions or edits) you agree to abide by its terms.

Elm - Functional Reactive Programming Language compiles to Javascript

  •    Javascript

Elm is a functional reactive programming (FRP) language that compiles to HTML, CSS, and JS. FRP is a concise and elegant way to create highly interactive applications and avoid callbacks. It aims to make web development more pleasant. Functional Reactive Programming (FRP) is a high-level way to work with interactions. It provides control flow structures for time.

functional-ruby - A gem for adding functional programming tools to Ruby

  •    Ruby

A gem for adding functional programming tools to Ruby. Inspired by Erlang, Clojure, and Functional Java. Two things I love are Ruby and functional programming. If you combine Ruby's ability to create functions sans-classes with the power of blocks, proc, and lambda, Ruby code can follow just about every modern functional programming design paradigm. Add to this Ruby's vast metaprogramming capabilities and Ruby is easily one of the most powerful languages in common use today.

fo - An experimental language which adds functional programming features to Go.

  •    Go

Fo is an experimental language which adds functional programming features to Go. The name is short for "Functional Go". Go already supports many features that functional programmers might want: closures, first-class functions, errors as values, etc. The main feature (and in fact only feature for now) that Fo adds is type polymorphism via generics. Generics encourage functional programming techniques by making it possible to write flexible higher-order functions and type-agnostic data structures.

Functional-Light-JS - A book about functional programming in JavaScript. @FLJSBook on twitter.

  •    Javascript

This book explores the core principles of functional programming (FP) as they are applied to JavaScript. But what makes this book different is that we approach these principles without drowning in all the heavy terminology. We look at a subset of FP foundational concepts that I call "Functional-Light Programming" (FLP) and apply it to JavaScript.Note: Despite the word "Light" in the title, I do not consider or recommend this book as a "beginner", "easy", or "intro" book on the topic. This book is rigorous and full of gritty detail; it expects a solid foundation of JS knowledge before diving in. "Light" means limited in scope; instead of being more broad, this book goes much deeper into each topic than you typically find in other FP-JavaScript books.

coconut - Simple, elegant, Pythonic functional programming.

  •    Python

Coconut (coconut-lang.org) is a variant of Python that adds on top of Python syntax new features for simple, elegant, Pythonic functional programming.

flyd - The minimalistic but powerful, modular, functional reactive programming library in JavaScript

  •    Javascript

The modular, KISS, functional reactive programming library for JavaScript. Functional reactive programming is a powerful programming paradigm for expressing values that change over time. But existing libraries for JavaScript are huge, complex, have a high learning curve and aren't functional enough.

functional-programming-jargon - Jargon from the functional programming world in simple terms!

  •    Javascript

Functional programming (FP) provides many advantages, and its popularity has been increasing as a result. However, each programming paradigm comes with its own unique jargon and FP is no exception. By providing a glossary, we hope to make learning FP easier. The number of arguments a function takes. From words like unary, binary, ternary, etc. This word has the distinction of being composed of two suffixes, "-ary" and "-ity." Addition, for example, takes two arguments, and so it is defined as a binary function or a function with an arity of two. Such a function may sometimes be called "dyadic" by people who prefer Greek roots to Latin. Likewise, a function that takes a variable number of arguments is called "variadic," whereas a binary function must be given two and only two arguments, currying and partial application notwithstanding (see below).

scalacaster - Purely Functional Algorithms and Data Structures in Scala

  •    Scala

Since Fender Stratocaster is a classic guitar, Scalacaster is about classic algorithms and data structures in Scala. Scalacaster includes loads of widely used implementation techniques and approaches, which have been developed by best programmers and enthusiasts of functional programming. Studying purely functional data structures is always fun and challenge for researchers, since data structures in a functional setting are much elegant and smarter than in an imperative setting. Scalacaster is neither a library nor framework. Moreover, Scalacaster`s code is not supposed to be executed at all. Scalacaster's code is not for Scala compiler but for human beings, for enthusiasts and researchers of the Scala programming language and its application in the area of implementation of the purely functional data structures. So, the best way to use Scalacaster is to read through its source code and comments.

category-theory-programmers - Notes on category theory in the context of (functional) programming


This document contains notes on category theory in the context of (functional) programming. Originally they were lecture notes for a seminar hosted at Centrum Wiskunde & Informatica, the national research centre for mathematics and computer science in the Netherlands. The main reason for compiling these notes is to provide a way to gain familiarity with concepts of category theory (and other branches of mathematics) that apply in a broad sense to the field of functional programming. The notes are written in Markdown, and pandoc is used to generate the document. Running make inside the doc directory should result in an (updated) pdf, granted that pandoc, pandoc-citeproc and a LaTeX environment are installed.

luafun - Lua Fun is a high-performance functional programming library for Lua designed with LuaJIT's trace compiler in mind

  •    Lua

Lua Fun is a high-performance functional programming library for Lua designed with LuaJIT's trace compiler in mind. Lua Fun provides a set of more than 50 programming primitives typically found in languages like Standard ML, Haskell, Erlang, JavaScript, Python and even Lisp. High-order functions such as map, filter, reduce, zip, etc., make it easy to write simple and efficient functional code.

We have large collection of open source products. Follow the tags from Tag Cloud >>

Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.