View source: R/InjuryCovariates.R
InjuryCovariates | R Documentation |
Define covariates from whale injury narratives based on presence or absence of key words or phrases used to predict health outcomes. 'Narratives' (case sensitive) should be in a wide-form data frame in column of same name. Append covariates to data frame using function InjuryCovariates(). Resulting data frame is used with Random Forest classification trees to predict health status of whales involved in entanglements or vessel strikes. Package includes example data frame "WhaleData"
InjuryCovariates(df)
df |
an object of class 'data.frame' |
Jim Carretta jim.carretta@noaa.gov
# append injury covariates to WhaleData
WhaleDataCovs <- InjuryCovariates(WhaleData)
head(WhaleDataCovs)
# show barplot of injury covariates by health status
barplotCovariates(WhaleDataCovs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.