unused argument error

Hi, and welcome!

Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers. Screenshots are rarely helpful to provide complete answers.

If you look at help(recode), the function signature is

recode(.x, ..., .default = NULL, .missing = NULL)

For the arguments in the screenshot being passed to recode

  • FHdemocracy is being picked up
  • The next argument expected is \ldots. These are optional and they are explained in the Arguments section:

\ldots Replacements. For character and factor .x, these should be named and replacement is based only on their name. For numeric .x, these can be named or not. If not named, the replacement is done based on position i.e. .x represents positions to look for in replacements. See examples.

  • This implies that Democrary and Non-Democracy must both already exist and that they are numeric. If not, they will be ignored and the unused message will appear.
  • .default may or may not be otherwise ok but "blocked" by those earlier in line; can't test without a reprex with data

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.