Description Usage Arguments Details Value References Examples
Use observed and randomized numbers of intransitive subnetworks per species/individual to calculate standardized effect sizes.
1 | boilDown(randomized, observed)
|
randomized |
Data frame of randomized transitivity results, from a call to spSig. |
observed |
The results of a call to transitivityChecker and then transCruncher with the same parameters as went into generating the randomized data frame. |
The user should separately derive randomized and observed numbers of intransitive subnetworks each species is expected to be involved in, following the format of the example below, then calculate the actual species' standardized effect sizes with this function.
Named numeric vector of species/individual-level standardized effect sizes.
Miller, E. T., D. N. Bonter, C. Eldermire, B. G. Freeman, E. I. Greig, L. J. Harmon, C. Lisle, and W. M. Hochachka. 2017. Fighting over food unites the birds of North America in a continental dominance hierarchy. biorxiv https://doi.org/10.1101/104133
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ## Not run:
#load in the example data
data(exInput)
#before doing anything, remove any RDS files in the tempdir, because they can
#cause major issues with this example
toDelete <- list.files(tempdir(), pattern=".RDS")
file.remove(paste(tempdir(), toDelete, sep="/"))
#subsample the data down and run a few iterations over it to illustrate function
exInput<-exInput[1:100,]
exInput[,1] <- as.factor(as.character(exInput[,1]))
exInput[,2] <- as.factor(as.character(exInput[,2]))
#derive the randomized numbers of intransitive networks each species is expected
#to be involved in
random <- spSig(disp.input=exInput, network.size=3, cutoff=0.5,
conservative=TRUE, write.wd=tempdir(), iterations=3, cores=4)
#derive the actual observed number of intransitive networks per species
transitivityChecker(disp.input=exInput, network.size=3, cutoff=0.5,
conservative=TRUE, write.wd=tempdir(), cores=4)
actual <- transCruncher(3, TRUE, tempdir())
#now calculate species' standardized effect scores. a bunch of these will be
#NA, because such a small number of randomized iterations
sppSES <- boilDown(randomized=random, observed=actual$intrans.results$`0.5`)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.