README.md

R Mini Tidy Package : miniTidyR

Build Status

Contributors:

Summary

We re-implemented R’s gather , spread , and drop_na functions that exist in the tidyverse package.

Our functions are called my_gather , my_spread and my_dropna:

Installation

To install and load miniTidyR run :

To access the vignette run:

Function usage examples

my_dropna

df1 <- data.frame(A = c(12,25,NA,45), B = c(12,NA,30,45))
my_dropna(df1)
df1

my_dropna(df1)

my_gather

df2 <- data.frame(Groups = c("A","B"), Married = c(12,25), Other = c(100,55))
my_gather(df2, "Status", "Count", list("Married","Other"))
df2

my_gather(df2, "Status", "Count", list("Married","Other"))

my_spread

df3 <- data.frame(Name = c("A","A","B","B"), key = c("Age","Weight","Age","Weight"), value = c(45,80,30,70))
my_spread(df3,"key","value")
df3

my_spread(df3,"key","value")

Branch coverage

Check output

Test output

Please note that these 6 warnings are part of the code



UBC-MDS/miniTidyR documentation built on May 7, 2019, 7:14 p.m.