Get Started →
Function Errors

Unused argument

Matches: unused argument

WHAT THIS ERROR MEANS

You passed an argument to a function that doesn't accept it. This often happens from typos in argument names or using arguments from a different function.

HOW TO FIX IT

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

2. Look for typos in argument names.

3. Make sure you're using the right function.

CODE EXAMPLES

BAD — THIS CAUSES THE ERROR
mean(x = c(1, 2, 3), na.action = TRUE)
GOOD — CORRECT APPROACH
mean(x = c(1, 2, 3), na.rm = TRUE)

Still stuck?

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

Try RChat Free →

RELATED FUNCTION ERRORS