项目作者: KevinRPan

项目描述 :
Commonly used functions for working with data.
高级语言: R
项目地址: git://github.com/KevinRPan/handy.git
创建时间: 2017-06-07T21:12:06Z
项目社区:https://github.com/KevinRPan/handy

开源协议:GNU General Public License v3.0

下载


handy

The handy package is an R toolbox of commonly used functions for working with data.

This package aims to reduce repetitive data cleaning code into easy to use functions compatible with tidy data philosophy.

Installation

Travis-CI Build Status
AppVeyor Build Status
Coverage Status

The user can use the devtools package to install the development version:

  1. ## devtools is required
  2. library(devtools)
  3. install_github("kevinrpan/handy")

Note: Windows users need devtools to install this way.

Cleaning data with handy

Philosophy

There are common steps that a data analyst faces:

  • Import (messy) data
  • Clean messy data
  • Describe cleaned data
  • Plot cleaned data
  • Model data
  • Write output tables

This package aims to facilitate this basic data handling.

These functions are ones that I’ve found handy.

Quick Reference Table

handy Function Use Case Description
clean_names Clean Data Normalize variable names of a data.frame to snake_case
title_names Clean Data Normalize variable names of a data.frame to Title Case
remove_columns Clean Data Removes columns that are either missing or non-unique
add_mean_row Describe Data Add a mean row to a data.frame of numeric values
add_total_row Describe Data Add a total row to a data.frame of numeric values
check_variables Describe Data Calculate % missing and number of unique values for all variables
%p% Shorthand Allow string concatenation by piping
cs Shorthand Makes a character vector without quotes
named_list Shorthand Makes a named list using object names
multiplot Plotting Arrange multiple plots
scale_x_human Plotting Scales ggplot axis to easily readable K, M, B, etc.
scale_y_human Plotting Scales ggplot axis to easily readable K, M, B, etc.
write_excel Write Output Write a list of data.frames in R to named sheets in an Excel workbook
write_regression_to_excel Write Output Write a list of data.frames in R to named sheets in an Excel workbook

Note: package is under development and functions available may change.

Contact

You are welcome to: