If you call setnames with just a vector of new names, then it looks like setnames(df, c("date", "place", "value")), which is fine. But if you name the argument supplying the new names, then the call looks like setnames(old = c("date", "place", "value"), df), which is confusing because you're supplying new names, not old ones. Consider allowing old to be missing, so new can be set by name instead.
If you call
setnameswith just a vector of new names, then it looks likesetnames(df, c("date", "place", "value")), which is fine. But if you name the argument supplying the new names, then the call looks likesetnames(old = c("date", "place", "value"), df), which is confusing because you're supplying new names, not old ones. Consider allowingoldto be missing, sonewcan be set by name instead.