| validate_input | R Documentation |
This function checks whether the dataset contains all required variables, whether the dependent and continuous variables are numeric, and whether the period variable is formatted correctly (e.g., "2020Q1", "2020M01"). It ensures that the data is suitable for further processing in hedonic index calculations.
validate_input(
dataset,
period_variable,
dependent_variable,
continuous_variables,
categorical_variables
)
dataset |
A data.frame containing the dataset to be validated. |
period_variable |
A string specifying the name of the period variable column. |
dependent_variable |
A string specifying the name of the dependent variable (usually the sale price). |
continuous_variables |
A character vector with names of numeric quality-determining variables. |
categorical_variables |
A character vector with names of categorical variables (including dummies). |
Returns TRUE invisibly if all checks pass. Otherwise, an error is thrown.
David Pietersz
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.