convert_perc | R Documentation |
Converts displacements RFID data into a format for easy use by the
Perc::as.conflictmat()
function included in the Perc
package. Can then be applied to internal Perc functions for calculating
dominance from perculation and conductance. Only includes individuals that
participated in at least one interaction.
convert_perc(d)
d |
Data frame or List. Either the specific interactions data frame which is
returned as a list item from |
A data frame of interactions for input into
Perc::as.conflictmat()
. See examples for specific application.
Perc package and it's function as.conflictmat. https://cran.r-project.org/package=Perc
# Calculate displacements d <- disp(visits(finches_lg)) # Format for use by Perc package i <- convert_perc(d) i <- convert_perc(d$interactions) # Equivalent ## Not run: # Use Perc package: library(Perc) # Calculate ranks (adapted from Perc examples) conflict_mat <- as.conflictmat(i, weighted = TRUE) perm <- conductance(conflict_mat, 2) simRankOrder(perm$p.hat, num = 10, kmax = 1000) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.