| visGroup | R Documentation | 
Group level plots of minutes of activity per day
visGroup(data,ID,activity,type,title,yaxis,xaxis,time,legendTitle,
         groupBy,groupFun,levels,heatcol)
| data | Summary data by day | 
| ID | Name of column that identifies groups or individuals | 
| activity | Name of column for activity to be plotted | 
| type | Type of plot. Options 'boxplot' or 'heatmap' | 
| title | Title of the plot | 
| yaxis | Axis title for vertical axis | 
| xaxis | Whether to pring the x axis label. Options are TRUE or FALSE | 
| time | Name of column that contains time index | 
| legendTitle | Title of legend for 'type=heatmap' | 
| groupBy | Option to plot by group, for 'type=heatmap' | 
| groupFun | If groupBy is specified, how are two groups defined? Provide a function to specify a statistic that divides the groups. For example, specify 'median' to divide the two groups by the overall median of the data. | 
| levels | Specifies thresholds for heatmap. For example, user can specify 'levels = c(0,300,600,1440)' to plot a heatmap of four levels. | 
| heatcol | Specifies colors for the heatmap. | 
A plot is returned.
Jaejoon Song <jjsong2@mdanderson.org>
##
## Example: A box plot
##
## Not run: 
library(acc)
data(NHANES)
NHANES_subset <- NHANES[1:300,]
visGroup(
data = NHANES_subset,
activity = 'wearTime',
ID = 'ID',
type = 'boxplot',
title = "Wear time at baseline",
yaxis = "Wear time (minutes per day)",xaxis=TRUE)
##
## Example: A heatmap
##
library(acc)
data(NHANES)
NHANES_subset <- NHANES[1:1000,]
visGroup(
data = NHANES_subset,
ID = 'ID',activity = 'wearTime',
type = 'heatmap',title = "Wear time at baseline",
yaxis = "ID",time = 'Day',
legendTitle = "Wear time",
groupBy = 'VO2max',groupFun = 'median',
levels = c(0,300,600,1440),
heatcol = c("white","mistyrose","lightpink","violetred1"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.