| apie {heR.Activities} | R Documentation |
Function to plot a pie chart of activity pattern data: Percent of time spent in a number of locations or activities.
apie(x, w=NULL, plot=TRUE, col=NULL)
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 |
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
Invoked for side effect of plotting a pie chart.
Neil E. Klepeis
http://klepeis.net
http://klepeis.net