# Aggregate price data to the 30-second frequency
aggregatePrice(sampleTData, alignBy = "secs", alignPeriod = 30)
# Aggregate price data to 30-minute frequency including zero return price changes
aggregatePrice(sampleTData, alignBy = "minutes", alignPeriod = 30, fill = TRUE)
Run the code above in your browser using DataLab