readSpreadsheet: Read a Downloaded Spreadsheet

Description Usage Arguments Value Note Author(s)

View source: R/readSpreadsheet.R

Description

Read a Downloaded Spreadsheet

Usage

1
2
3
4
5
6
7
readSpreadsheet(
  destfile,
  series,
  subFileName,
  fieldForColumnNames,
  deleteFiles
)

Arguments

destfile

File path of the downloaded spreadsheet.

series

Character string giving the name of the data series to retrieve.

subFileName

Name of the spreadsheet for download according to the source URL.

fieldForColumnNames

If replaceColumnNames is TRUE then this variable specifies which columns of the meta data file will be used to construct the column names. Defaults to “Series” but sometimes you may want to change it to “Group” or c(“Group”, “Series”). “SeriesID” is also allowed.

deleteFiles

Logical indicating whether to delete the spreadsheet after reading it.

Value

The contents of the spreadsheet. For most series this will be in the form of a list of two data frames, one called “data” and the other “meta”. For some series (see specialCases()), the data is not in the standard format as the rest and so is just returned directly as the results of read_xlsx for each sheet in the spreadsheet.

Note

Series B13 doesn't have a full date specified, only year or month and year. These values values are returned as the first of the month/year.

Author(s)

Jasper Watson


RBNZ documentation built on July 28, 2020, 1:06 a.m.