I was able to get it to work by converting the column in the dataframe to a character using this command:
df$day <- as.character(df$day)
and it worked like a charm! Thanks for your advice @haci
You can give a try by converting the column of numbers to a factor variable.