I´m running the following code in a quarto document
{r}
library("fpp3")
library("writexl")
Compute features
tourism_features <- tourism %>%
features(Trips, feature_set(pkgs="feasts"))
{r}
pcs <- tourism_features %>%
select(-State, -Region, -Purpose) %>%
prcomp(scale=TRUE) %>%
augment(tourism_features)
pcs %>%
ggplot(aes(x=.fittedPC1, y=.fittedPC2, col=Purpose)) +
geom_point() + theme(aspect.ratio=1)
i get this error
**Error in UseMethod("augment") : **
no applicable method for 'augment' applied to an object of class "prcomp"
Referred here by Forecasting: Principles and Practice, by Rob J Hyndman and George Athanasopoulos