Learn R Programming

BGVAR (version 2.5.8)

excel_to_list: Read Data from Excel

Description

Reads a spreadsheet from excel and converts it to a list for use of bgvar.

Usage

excel_to_list(file, first_column_as_time=TRUE, skipsheet=NULL, ...)

Value

Returns a list of length N which contains each a matrix of size T times k, where T are time periods and k variables per entity.

Arguments

file

A path to the file.

first_column_as_time

Logical indicating whether the first column indicates the time.

skipsheet

If one or more sheets should be skipped for reading, this can be provided with this argument. Either a vector of numeric indices or a vector of strings.

...

Additional arguments.

Author

Maximilian Boeck

Details

Note that each sheet has to be named for a respective country. Column names are used as variable names. Reader uses the readxl R package, hence additional arguments can be passed to the function. Furthermore, if first_column_as_time=TRUE then the column name has also to be time.

See Also

bgvar for estimation of a bgvar object.