R Errors Explained & Fixed.
A complete, searchable reference of common R programming errors. Each entry includes a plain-English explanation, step-by-step fix, and code examples.
68 errors found
Object not found
object '([^']+)' not found
Function not found
could not find function "([^"]+)"
Unused argument
unused argument
Package not installed
there is no package called '([^']+)'
Package version mismatch
package '([^']+)' was built under R version
Package load failed
package or namespace load failed
Unexpected token
unexpected '([^']+)' in
Unexpected end of input
unexpected end of input
Unexpected symbol
unexpected symbol in
Unexpected string constant
unexpected string constant
Extra closing parenthesis
unexpected .+\).+ in
Non-numeric argument to operator
non-numeric argument to binary operator
Argument not numeric or logical
argument is not numeric or logical
Cannot coerce type
cannot coerce type '([^']+)' to vector of type '([^']+)'
Invalid argument type
invalid '([^']+)' argument
Replacement length mismatch
replacement has (\d+) rows?, data has (\d+)
Differing number of rows
arguments imply differing number of rows
Subscript out of bounds
subscript out of bounds
Undefined columns selected
undefined columns selected
$ operator on atomic vector
\$ operator is invalid for atomic vectors
Incorrect number of dimensions
incorrect number of dimensions
Cannot open connection
cannot open the connection
File not found
no such file or directory
Permission denied
cannot open file '([^']+)': Permission denied
Missing required argument
argument "([^"]+)" is missing, with no default
Argument matched multiple times
formal argument "([^"]+)" matched by multiple actual argumen...
Cannot allocate memory
cannot allocate vector of size
Missing value in condition
missing value where TRUE\/FALSE needed
Condition has length > 1
the condition has length > 1
Duplicate arguments
duplicate '([^']+)' arguments
Vector length not a multiple
longer object length is not a multiple of shorter object len...
Non-conformable arguments
non-conformable arguments
NAs from coercion
NAs introduced by coercion
Attempt to apply non-function
attempt to apply non-function
Closure is not subsettable
object of type 'closure' is not subsettable
Connection failed
cannot open connection
Recursive indexing failed
recursive indexing failed
No applicable method
no applicable method for '([^']+)'
Replacement length not a multiple
number of items to replace is not a multiple
Missing x and y for plot
supply both 'x' and 'y' or a matrix-like
Unimplemented type
unimplemented type '([^']+)' in
dplyr column not found
Can't find column|Column .* doesn't exist
Join type mismatch
Can't join on .* incompatible types
Join column not found
Join columns? .* must be present in the data
summarise result size
Result must be size 1, not
Names do not match (rbind)
names do not match previous names
Pipe operator missing function call
pipe operator requires a function call
Missing ggplot2 aesthetics
geom_.* requires the following missing aesthetics
ggplot2 data must be a data frame
data must be a data\.frame
Cannot subset non-existent columns
Can't subset columns that don't exist
NA/NaN/Inf in model fit
na\/nan\/inf in ['"]?(x|y)|NA.*NaN.*Inf.*foreign function
Singular or rank-deficient fit
(nearly )?singular fit|rank-deficient
GLM did not converge
algorithm did not converge
Fitted probabilities 0 or 1
fitted probabilities numerically 0 or 1
Factor has new levels in predict
factor .* has new levels
Contrasts require 2+ factor levels
contrasts can be applied only to factors with 2 or more leve...
Invalid model formula
invalid model formula
All date formats failed to parse
All formats failed to parse
Character not in standard date format
character string is not in a standard unambiguous format
NaNs produced
NaNs produced
Deprecated function
is deprecated
Grouped output warning
has grouped output.*\.groups
Argument of length zero
argument of length 0
Data reading row mismatch
line \d+ did not have \d+ elements
More columns than column names
more columns than column names
Stack overflow / recursion depth exceeded
stack overflow|evaluation depth
Encoding / iconv error
cannot convert|invalid byte sequence
Object is not a data frame
object is not a data frame
RChat fixes R errors automatically.
Paste your error or let the AI detect it. Get an explanation in context of your actual code and apply the fix with one click.