summarize_and_plot_graph_and_distribution_structure_information | R Documentation |
Compute final PU and species counts and plot degree and abundance distributions.
summarize_and_plot_graph_and_distribution_structure_information( PU_spp_pair_indices, cor_or_app_label, all_correct_node_IDs, plot_output_dir, spp_col_name, PU_col_name, presences_col_name )
PU_spp_pair_indices |
2 column data frame of PU IDs vs species IDs, where each row identifies a the ID of a given species that occurs on the given planning unit |
cor_or_app_label |
character string for labelling as Correct or Apparent |
all_correct_node_IDs |
numeric vector containing all planning unit IDs that appear in the correct problem, not to be confused with the set of planning IDs that appear in the correct solution |
plot_output_dir |
character string giving pat to directory where plot should be written |
spp_col_name |
character string giving species column name in data frames |
PU_col_name |
character string giving planning unit column name in data frames |
presences_col_name |
character string giving column name for species counts (presences) in data frames |
Count the number of species on each PU. If a PU has no species on it, it won't necessarily be in the PU_spp_pair_indices table, so this routine adds the PU back into the table with a zero count.
This means that even though PU_spp_pair_indices could be either a correct or an apparent set of PU-spp pairs, all_correct_node_IDs HAS
final_link_counts_for_each_node, i.e., species count for each node, i.e., 2 column data frame of PU_IDs vs. number of species on corresponding PU
## Not run: tot_num_nodes = 6 PU_spp_pair_indices = data.frame (PU_ID=1:tot_num_nodes, spp_ID=c(1,1,2,2)) all_correct_node_IDs = 1:tot_num_nodes final_link_counts = clean_up_final_link_counts_for_each_node (PU_spp_pair_indices, all_correct_node_IDs, "PU_ID", "freq") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.