Function Errors
Attempt to apply non-function
Matches: attempt to apply non-function
WHAT THIS ERROR MEANS
You tried to call something as a function (using parentheses) but it isn't a function. A common cause is accidentally overwriting a built-in function name with a variable.
HOW TO FIX IT
1. Check if you accidentally used a function name as a variable.
2. Don't name variables 'c', 'data', 'df', 'mean', 'sum', etc.
3. Use rm(variable) to remove the conflicting variable.
CODE EXAMPLES
BAD — THIS CAUSES THE ERROR
c <- 5 c(1, 2, 3) # c is now a number, not the combine function
GOOD — CORRECT APPROACH
rm(c) # remove the variable c(1, 2, 3) # now works
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...