Description Usage Arguments Examples
This function takes columns that are names like (DensityABCO, DensityABMA,
DensityCADE) and changes the data.frame into something like (Species,
Density), with a key/value system instead. Check out the examples for how it
works. It's used within parseOutFile
.
1 | changeColsBySpp(df, removalkey, dead = F)
|
df |
The data.frame to search |
removalkey |
The repeated part of the column name to remove, e.g., "Density" |
dead |
If dead=T, append "Natural.Dead." to the removal key and subset that way. |
1 2 | testdf <- data.frame(DensityABCO=c(1,2), DensityABMA=c(3,4), DensityCADE=c(5,6), stringsAsFactors=F)
changeColsBySpp(testdf, "Density", dead=F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.