This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' aggregate.data.table | |
#' | |
#' Use to quickly aggregate rows from a data.frame | |
#' | |
#' @param x data.table | |
#' @param by list of columns to use for grouping | |
#' @param FUN summary function | |
#' @param \dots further arguments to summary function | |
#' @param is.value determines which of the remaining columns should be aggregated (numeric, POSIXct, character, etc.) | |
#' @author David Holstius \email{[email protected]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Steve Pittard - [email protected], 03/19/12 | |
# Code to illustrate motivations for using apply function | |
# | |
# See www.bimcore.emory.edu/bbseries for slides and code downloads | |
# | |
# References include: | |
# http://statland.org/R/R/Rpulse2.htm , http://www.cyclismo.org/tutorial/R/tables.html#manipulations | |
# http://nsaunders.wordpress.com/2010/08/20/a-brief-introduction-to-apply-in-r/ | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(ggplot2) | |
# Download DataTables JS file and TableTools full package from http://datatables.net/download/ | |
# Change the paths appropriately: | |
addResourcePath('datatables','/Users/yourusername/Downloads/DataTables-1.9.4/media') | |
addResourcePath('tabletools','/Users/yourusername/Downloads/TableTools-2.1.5/media') | |
runApp(list( | |
ui = basicPage( |