load_file: Load a data set from a .sav, .dta, or .csv file

Description Usage Arguments Value Examples

Description

This function prints the columns of the loaded data set. The abbreviation (scl) is used to denote scale (numeric) columns, and (nom) is used to denote nominal (factor) columns. The function returns an object of class av_state. Objects of this class are used throughout this package to store VAR data sets, models, and results.

Usage

1
load_file(filename, file_type = c("SPSS", "STATA", "CSV"), log_level = 0)

Arguments

filename

path and filename of the data set to load. The path can be relative to the current working directory.

file_type

specifies whether the file contains STATA, SPSS, or CSV data. This argument is optional. When not specified, it is determined from the file name, i.e., .dta extensions are treated as STATA files, .sav extensions are treated as SPSS files, and .csv extensions are treated as CSV files.

log_level

sets the minimum level of output that should be shown (a number between 0 and 3). A lower level means more verbosity. Specify a log_level of 3 to hide messages about the data set that was loaded.

Value

This function returns the newly created av_state object.

Examples

1
2
3
4
5
## Not run: 
av_state <- load_file("../data/input/RuwedataAngela.sav")
print(av_state)

## End(Not run)

roqua/autovar documentation built on May 27, 2019, 10:41 p.m.