README.md

Utilities for Data Analysis in R

This R package contains a set of functions that facilitate commonly applied data preparation and exploration steps.

Main Functions in the Package

Installation

devtools::install_github('jcizel/GeneralUtilities')
require(GeneralUtilities)

Examples

dt2HList

## HIERARCHICAL PLOTS WITH `networkD3`
##
## Below I illustrate the utility of the `df2Hlist` function by recreating some
## of the examples discussed by `@timelyportfolio` in Week 3 of his `htmlwidgets`
## blog (see http://www.buildingwidgets.com/blog/).

devtools::install_github("timelyportfolio/networkD3@feature/d3.chart.layout")
require(networkD3)

l <- 
    df2HList(dt = mtcars,
             split = c('gear','carb'),
             sizeVar = 'wt')

## Add root node (necessary for some graphs)
l2 <- list(
    root = 'test',
    children = l
)

## Plot 1
hierNetwork(
    List = l2,
    type = 'tree.cartesian',
    zoomable = T,
    collapsible = T
)

## Plot 2
hierNetwork(
    List = l2,
    type = 'tree.radial',
    zoomable = T,
    collapsible = T
)

## The following plots also rely on the sizeArg argument

## Plot3
hierNetwork(
    List = l2,
    type = 'pack.nested',
    zoomable = T,
    collapsible = T
)

## Plot4
hierNetwork(
    List = l2,
    type = 'pack.nested',
    zoomable = T,
    collapsible = T
)


## Plot 5
hierNetwork(
    List = l2,
    type = 'partition.rectangle',
    zoomable = T,
    collapsible = T
)



jcizel/GeneralUtilities documentation built on May 18, 2019, 10:24 p.m.