Need your suggestion, I have below table generated dynamically based on monthly data:
I need to compare each row across columns and create a new data frame based on priority set as Fish > dog > horse > cat such that the sample output looks like,
df <- data.frame(Col_1 = c('cat', 'dog', 'cat'),
Col_2 = c('dog', 'horse', 'fish'),
Col_3 = c('horse', 'cat', NA),
Col_4 = c('fish', 'horse', NA))

