Add character factor column in R based on integer in previous column?
I have a dataframe of hail events and their numeric related damages. I want to add a column (DAMAGE_PROP) that has factors of “yes” or “no” to indicate whether or not there was damage to the property as indicated in the existing column DAMAGE_PROPERTY_NUM. With the code I’m currently using, I’m getting an “unused argument” error (levels = 2, labels = c(“yes”, “no”)).