# NOT RUN {
# Load in sample data frame
data(unidata)
# Get data from ID number 21005
counts.part1 <- unidata[unidata[, "seqn"] == 21005, "paxinten"]
# Create vector of all 10-minute moving averages
all.10min.averages <- movingaves(x = counts.part1, window = 10)
# Calculate maximum 10-minute moving average
max.10min.average <- movingaves(x = counts.part1, window = 10, return.max = TRUE)
# }
Run the code above in your browser using DataLab