powered by
Creates a presence-absence matrix (PAM) from a data.frame that contains species names and identifiers of positions where species are found.
PAM_from_table(data, ID_column, species_column)
data.frame of species found in distinct positions (defined by identifiers). Must include at least two columns: "ID" and "Species".
(character) name of the column containing identifiers.
(character) name of the column containing species names.
Species' presence (1) and absence (0) matrix for a set of positions defined by identifiers.
# NOT RUN { # Data data("sp_data", package = "biosurvey") # PAM pam <- PAM_from_table(data = sp_data, ID_column = "ID", species_column = "Species") pam[1:10, c(1, 21:25)] # }
Run the code above in your browser using DataLab