Reads a pigauto_fit object previously saved with
save_pigauto.
Examples
# \donttest{
data(avonet300, tree300)
tree <- ape::keep.tip(tree300, tree300$tip.label[seq_len(30L)])
traits <- avonet300[match(tree$tip.label, avonet300$Species_Key),
c("Mass", "Wing.Length"), drop = FALSE]
rownames(traits) <- tree$tip.label
traits$Mass[seq_len(3L)] <- NA_real_
fit <- impute(traits, tree, epochs = 5L, verbose = FALSE)$fit
#> Error: Lantern is not loaded. Please use `install_torch()` to install additional dependencies.
path <- tempfile(fileext = ".pigauto")
save_pigauto(fit, path)
#> Error: object 'fit' not found
pred <- predict(load_pigauto(path))
#> Error in load_pigauto(path): File not found: /tmp/RtmpZVwa03/file20f7519c049a.pigauto
# }
