apie {heR.Activities}R Documentation

Plot a pie chart of activity pattern data

Description

Function to plot a pie chart of activity pattern data: Percent of time spent in a number of locations or activities.

Usage

apie(x, w=NULL, plot=TRUE, col=NULL)

Arguments

x activity pattern data (i.e., time spent in locations or activities)
w weights for data in x
plot whether to produce the plot or not
col color to use

Details

Takes a data frame x as input and calculates the percentage that each variate (field) contributes to the total (presumably 24-hrs or some other even time interval). The percentage is calculated as the mean time spent in a certain activity or location (each field in x) divided by the mean time spent in all the locations or activities being considered. Weighted means are used if a vector w containing weights is supplied; w should have a length equal to the number of rows in x.

Rows with missing weights are removed; the mean and weighted.mean functions remove missing values

Value

Invoked for side effect of plotting a pie chart.

Author(s)

Neil E. Klepeis
http://klepeis.net
http://klepeis.net


[Package heR.Activities version 0.0.4 Index]