Learn R Programming

dateutils (version 0.1.5)

seas_df_long: Seasonally adjust long format data using seas()

Description

Seasonaly adjust multiple monthly or quarterly series in long format using X-13 SEATS via seas()

Usage

seas_df_long(
  df,
  sa_names,
  x11 = FALSE,
  transfunc = "none",
  series_names = "series_name",
  value_var = "value",
  date_var = "ref_date"
)

Arguments

df

long format dataframe

sa_names

names of series to seasonally adjust

x11

T/F, use x11 as opposed to X-13 SEATS

transfunc

Data transformation, one of `none` for no transformation, `auto` for automatic detection, or `log` for log transformation

series_names

name of column containing series names

value_var

name of column containing values

date_var

name of column containing dates

Value

A list with data.frames `sa_factors` containing seasonal factors and `values_sa` containing seasonally adjusted data.

Examples

Run this code
# NOT RUN {
seas_df_long(fred[series_name == "gdp constant prices"], sa_names="value")
# }

Run the code above in your browser using DataLab