validate_raw_dataframe: Validates the dataframe given to the autovar function

Description Usage Arguments Value Examples

View source: R/validate_raw_dataframe.r

Description

This function returns the given data frame as a numeric matrix, using as.numeric to convert any columns in the data frame that are not numeric. A stop() error is thrown if there is not enough data in the data frame.

Usage

1
validate_raw_dataframe(raw_dataframe)

Arguments

raw_dataframe

The raw, unimputed data frame.

Value

A numeric matrix with converted values and names taken from the data frame.

Examples

1
2
3
4
raw_dataframe <- data.frame(id = rep(1, times = 5),
  tijdstip = c(1, 3, 5, 6, 7),
  home = c(1, 0, 0, NA, 1))
autovarCore:::validate_raw_dataframe(raw_dataframe)

roqua/autovarCore documentation built on Oct. 12, 2020, 4:16 a.m.