Learn how R handles sampling frequency in time-series data. The tutorial covers three types of series: evenly spaced (hourly readings), irregularly spaced (whenever you check), and evenly spaced with gaps (missing values). Use R functions like start(), end(), frequency(), and deltat() to verify spacing and intervals.
Chapters
Some time series data is exactly evenly spaced, for example Hourly temperature measurements for every hour in a day. Sometimes time series data is only approximately evenly spaced, for example Temperature measurements recorded every time you check your email sometime. Series data is evenly spaced but with missing values, for example Hourly temperature measurements while you are awake. The analysis of time series data proceeds with some simplifying assumptions. The first assumption is that consecutive observations are equally spaced. Secondly, a discrete time observation index is applied. In practice, this may only hold approximately and sometimes data may be missing. For example, daily log returns on a stock may only be available for weekdays and data may not be available for certain holidays. Monthly CPI values are equally spaced by month but not by day. You can apply the start function to the hourly temperature measurement series to confirm that it begins on day one at hour one. Similarly, applying the end function confirms that the series last observation is on day one at hour 24. The frequency function reports that 24 observations are made each day, and the delta t function notes that observations are made every 0.0417 days. That is the time increment between observations is 1. 24. Now let's investigate time series sampling frequencies further.