Get Started →
Function Errors

Argument matched multiple times

Matches: formal argument "([^"]+)" matched by multiple actual arguments

WHAT THIS ERROR MEANS

You provided the same argument twice — once by name and once by position, or used the same name twice.

HOW TO FIX IT

1. Remove the duplicate argument.

2. Use either positional or named arguments, not both for the same parameter.

3. Check the function signature with args(function_name).

CODE EXAMPLES

BAD — THIS CAUSES THE ERROR
rnorm(10, mean = 0, 0)  # mean specified twice
GOOD — CORRECT APPROACH
rnorm(10, mean = 0, sd = 1)

Still stuck?

Paste your code in RChat and the AI will fix this error in context.

Try RChat Free →

RELATED FUNCTION ERRORS