Package Errors
Package load failed
Matches: package or namespace load failed
WHAT THIS ERROR MEANS
The package exists but couldn't be loaded, usually because one of its dependencies is missing or incompatible.
HOW TO FIX IT
1. Try reinstalling: install.packages('package', dependencies = TRUE).
2. Check which dependency failed in the full error message.
3. Install the missing dependency separately.
CODE EXAMPLES
BAD — THIS CAUSES THE ERROR
library(rJava) # requires Java runtime
GOOD — CORRECT APPROACH
# Install system dependency first, then:
install.packages("rJava", dependencies = TRUE)Still stuck?
Paste your code in RChat and the AI will fix this error in context.
RELATED R ERRORS
Package not installed The package you're trying to load hasn't been installed on your system yet....
Package version mismatch The installed package was compiled with a newer version of R than you're running...
Object not found R cannot find a variable or object with the name you used. This usually means yo...
Function not found R doesn't recognize the function you're trying to call. The package containing i...