Get Started →
Function Errors

Missing required argument

Matches: argument "([^"]+)" is missing, with no default

WHAT THIS ERROR MEANS

A function requires a specific argument that you didn't provide, and there's no default value for it.

HOW TO FIX IT

1. Check the function's documentation with ?function_name.

2. Provide the missing argument.

3. Look at the function's usage section for required parameters.

CODE EXAMPLES

BAD — THIS CAUSES THE ERROR
rnorm()  # n is required
GOOD — CORRECT APPROACH
rnorm(n = 10)  # specify how many random numbers

Still stuck?

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

Try RChat Free →

RELATED FUNCTION ERRORS