Output an error message when column names don't match
marlycormar opened this issue · comments
Marly Gotti commented
Output a descriptive error message when the selector columns do not exist in the dataset. For example,
in the code below apd_pca(predictors)
doesn't contain columns matching "PC00[1-3]".
library(applicable)
predictors <- mtcars[, -1]
mod <- apd_pca(predictors)
autoplot(mod, matches("PC00[1-3]"))
As a result, it throws the following error.
Error: At least one layer must contain all faceting variables:
component
.
- Plot is missing
component
- Layer 1 is missing
component