Get Started →
Function Errors

Function not found

Matches: could not find function "([^"]+)"

WHAT THIS ERROR MEANS

R doesn't recognize the function you're trying to call. The package containing it may not be loaded, or the function name is misspelled.

HOW TO FIX IT

1. Check the function name for typos.

2. Load the required package with library().

3. Use ?function_name or help(function_name) to verify it exists.

CODE EXAMPLES

BAD — THIS CAUSES THE ERROR
# ggplot2 not loaded
ggplot(data, aes(x, y)) + geom_point()
GOOD — CORRECT APPROACH
library(ggplot2)
ggplot(data, aes(x, y)) + geom_point()

Still stuck?

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

Try RChat Free →

RELATED FUNCTION ERRORS