dvAnalytics

Travis-CI Build Status Coverage Status CRAN_Status_Badge

The goal of dvAnalytics is to provide specific analytical tools for mining and exploration of Robotic Surgery data. Many of this functions are generalized and can be extended for use in other domains or data problems.

Example Usage

This is a basic example of how to use the function fnWeight to get the proportion of a group within a larger population

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

First setup the data and use the function \code{NumMorph} from package \code{easydata} to standardize column classes:

library(dvAnalytics)
library(data.table)
library(easydata)

# Load example dataset:
#  - Then change all potential numeric columns, to numeric
#    classes (this does it safely, quickly, and by reference)
#
data("fiberCountyDem")
NumMorph(fiberCountyDem)

Now run the calculation with \code{fnWeight}. Recall our goal... Calculate each U.S. state's share of total U.S. population, by each year in our data

# Calculate each state's share of total US population,
# by each year in our data
#
result <- fnWeight(fiberCountyDem, "State", "Year", sum(Population))
head(result)


bfatemi/dvAnalytics documentation built on May 12, 2019, 7:26 p.m.