landscape <- terra::rast(landscapemetrics::landscape)
get_unique_values(landscape)
landscape_stack <- c(landscape, landscape, landscape)
get_unique_values(landscape_stack)
landscape_matrix <- terra::as.matrix(landscape, wide = TRUE)
get_unique_values(landscape_matrix)
x_vec <- c(1, 2, 1, 1, 2, 2)
get_unique_values(x_vec)
landscape_list <- list(landscape, landscape_matrix, x_vec)
get_unique_values(landscape_list)
Run the code above in your browser using DataLab