GithubHelp home page GithubHelp logo

kgolyaev / pmdplyr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nickch-k/pmdplyr

0.0 0.0 0.0 562 KB

Panel Maneuvers in dplyr: An R package for cleaning and manipulating panel and hierarchical data

License: Other

R 100.00%

pmdplyr's Introduction

pmdplyr

An R package for cleaning and manipulating panel and hierarchical data.

This is a suite of tools extending the dplyr package to perform data manipulation. These tools are geared towards use in panel data and hierarchical data.

Unlike other suites dealing with panel data, all functions in pmdplyr are designed to work even when considering a set of variables that do not uniquely identify rows. This is handy when working with any kind of hierarchical data, or panel data where there are multiple observations per individual per time period, like student/term/class education data.

Install this package using devtools::install_github('NickCH-K/pmdplyr') and use help(pmdplyr) for more information.

Functions included in the package:

  1. between and within: Standard between and within panel calculations.
  2. fixed_check: Checks a list of variables for consistency within a panel structure.
  3. fixed_force: Forces a list of variables to be constant within a panel structure.
  4. id_variable: Takes a list of variables that make up an individual identifier and turns it into a single variable.
  5. time_variable: Takes a time variable, or set of time variables, and turns them into a single well-behaved integer time variable of the kind required by most panel functions.
  6. inexact_join: Set of wrappers for the dplyr join functions which allows for a variable to be matched inexactly, for example joining a time variable in x to the most recent previous value in y.
  7. pdeclare and is_pdeclare: Set the panel structure for a data set, or check if it is already set.
  8. mutate_cascade: A wrapper for dplyr::mutate which runs one period at a time, allowing changes in one period to finalize before the next period is calculated.
  9. mutate_subset: A wrapper for dplyr::mutate that performs a calculation on a subset of data, and then applies the result to all the observations (within group).
  10. panel_fill: Fills in gaps in the panel. Can also fill in at the beginning or end of the data to create a perfectly balanced panel.
  11. panel_locf: A last-observation-carried-forward function for panels. Fills in NAs with recent nonmissing observations.
  12. tlag: Lags a variable in time.

pmdplyr's People

Contributors

nickch-k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.