Skip to contents

Create vintages table from XLSX files

Usage

create_vintages_from_xlsx(
  file,
  type = c("long", "horizontal", "vertical"),
  periodicity,
  ...
)

Arguments

file

character containing the name of the file which the data are to be read from.

type

character specifying the type of representation of the input between `"long"`, `"horizontal"` and `"vertical"` approach.

periodicity

periodicity of the time period (12, 4 or 1 for resp. monthly, quarterly or annual data)

...

Arguments to be passed to `readxl::read_excel()`, for example: * `sheet` character containing the sheet to read * `range` A cell range to read from * `col_names` a boolean to use the first row as column names * `...`

Value

an object of class `rjd3rev_vintages`

See also

[create_vintages_from_csv()], [create_vintages()] which this function wraps.

Examples

if (FALSE) {
file_name <- "myinput.xlsx"
sheet_name <- "Sheet1"
vintages <- create_vintages_from_xlsx(
    file = file_name,
    type = "horizontal",
    periodicity = 12L,
    sheet = sheet_name
)
}