InjuryCovariates: InjuryCovariates

View source: R/InjuryCovariates.R

InjuryCovariatesR Documentation

InjuryCovariates

Description

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"

Usage

InjuryCovariates(df)

Arguments

df

an object of class 'data.frame'

Author(s)

Jim Carretta jim.carretta@noaa.gov

Examples


# append injury covariates to WhaleData

WhaleDataCovs <- InjuryCovariates(WhaleData)

head(WhaleDataCovs)

# show barplot of injury covariates by health status
 barplotCovariates(WhaleDataCovs)


JimCarretta/SeriousInjury documentation built on Feb. 29, 2024, 4:58 p.m.