# Set file path
filepath <- system.file("extdata", package = "FishDiveR")
# Load pc_data
pc_data <- readRDS(file.path(filepath, "data/4_PCA/pc_data.rds"))
# Run a minimal, fast pca_results example
pc_results <- pca_results(
pc_data = pc_data,
standardise = TRUE,
No_pcs = 1,
PCV = NULL,
plot_eigenvalues = FALSE,
output = TRUE,
output_folder = tempdir(),
verbose = TRUE,
interactive_mode = FALSE
)
# \donttest{
# Full example using the complete dataset
# Run pca_results function
pc_results <- pca_results(
pc_data = pc_data,
standardise = TRUE,
No_pcs = 3,
PCV = NULL,
plot_eigenvalues = TRUE,
output = TRUE,
output_folder = tempdir(),
verbose = TRUE,
interactive_mode = FALSE
)
# }
Run the code above in your browser using DataLab