I frequently find myself wanting to iterate over a data frame to output a English sentence for each item. This often take the form of what becomes a long and frequently complex paste0() operation. It becomes complex because the grammar of that sentence is affected by the value in the variables.
As a simple example, inside the paste0() I might embed an ifelse() to account for pluralization. If some value X is zero I might add "no objects" to the sentence but if X is one, I would want "one object" added to the string and it's more than one, I'd want str(x) + " objects" appended.
Every time I go through this process the resulting code seems unwieldy and inelegant. It makes me think there's likely a better way to go.
If this all makes sense to you, I'd value any advice.