4 Syntactic error
4.1
: Common syntactic error
Incorrect use of a function or incorrect values of arguments of a function
Error:
Error in file(file, "rt") : cannot open the connectionError:
Error in setwd() : cannot change working directoryError:
Error in library(“X”) : there is no package called ‘X’Error:
could not find functionError in
iffunction:missing value where TRUE/FALSE is neededError:
Error in eval; object not foundError:
unexpected ‘X’ in “X”- X can be a punctuation mark, parenthesisError:
incorrect number of dimensionsError:
subscript out of boundsError:
undefined columns selectedError:
Error in x: non-numeric argument to a binary operatorError:
unexpected numeric constant in XError:
non-numeric argument to mathematical functionError:
Error in FUN : invalid ‘type’ (character) of argumentError:
no applicable method- caused by using an object-oriented function on a data type it does not supportError:
number of items to replace is not a multiple of ## replacement lengthError:
unexpected numeric constantError:
condition has length > 1Error:
$ operator is invalid for atomic vectorsError:
unimplemented type ‘list’Error:
replacement has length zeroError:
argument is of length zeroError:
incorrect number of subscripts on matrixError:
subscript out of boundsError:
incorrect number of dimensionsError:
replacement has x rows, data has yError:
arguments imply differing number of rowsError:
missing values are not allowed in subscripted assignments of data framesError:
Object of Type ‘Closure’ is not Subsettable
4.2
Built-in Exceptions
For a list of Python errors, check the official built-in exceptions documentation.