remove_bad_years <- function(species_name, subset_table, list_summaries){
# Good years for this species
good_years <- names(subset_table[species_name, subset_table[species_name, ] == TRUE])
# Data for this species
data <- list_summaries[[species_name]]
# Now subset
new_data <- data[good_years, ]
return(new_data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.