Get Started →
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.

Try RChat Free →

RELATED FUNCTION ERRORS