Function Errors
Duplicate arguments
Matches: duplicate '([^']+)' arguments
WHAT THIS ERROR MEANS
You passed the same named argument more than once to a function.
HOW TO FIX IT
1. Remove the duplicate argument.
2. Check for both positional and named versions of the same argument.
CODE EXAMPLES
BAD — THIS CAUSES THE ERROR
plot(x, y, col = "red", col = "blue")
GOOD — CORRECT APPROACH
plot(x, y, col = "red")
Still stuck?
Paste your code in RChat and the AI will fix this error in context.
RELATED FUNCTION ERRORS
Function not found R doesn't recognize the function you're trying to call. The package containing i...
Unused argument You passed an argument to a function that doesn't accept it. This often happens ...
Missing required argument A function requires a specific argument that you didn't provide, and there's no ...
Argument matched multiple times You provided the same argument twice — once by name and once by position, or use...