Four messages, four causes
◈ 7 cardsobject 'Orders' not found = a name that does not exist (typo, or the assignment never ran). unexpected symbol = a missing comma or operator. could not find function "read_csv" = the package is not loaded, or the function name is misspelled. non-numeric argument to binary operator = arithmetic on a chr column. A + prompt = an unclosed bracket or quote.
Errors are messages, not verdicts
The F2025 reviews describe R's error messages as the point where people give up. They are four sentences, each with one cause, and each cause has one fix. Every one below was triggered on the orders frame and pasted as R printed it.
Worked example — the four messages
1. A name that does not exist.
> Orders$amount
Error: object 'Orders' not found
R is case-sensitive; Orders is not orders. The same message appears when the name is spelled right but the assignment line has not been run this session — the Environment pane shows what exists. Fix: check the spelling; run the assignment.
2. A missing comma or operator.
> subset(orders amount > 500)
Error: unexpected symbol in "subset(orders amount"
R read orders and then, with no comma, met another name it could not attach to anything. "Unexpected symbol", "unexpected numeric constant" and "unexpected string constant" are the same diagnosis: two things sit next to each other with nothing joining them. The message quotes the code up to the exact point it stopped. Fix: put the comma or operator where the quote ends.
3. A function R cannot see.
> read_csv("orders.csv")
Error in read_csv("orders.csv") : could not find function "read_csv"
read_csv lives in the readr package, which is installed but not loaded — library(readr) first. The other cause is a misspelling: Mean(orders$amount) gives could not find function "Mean". Fix: library() the package, or fix the name.
One cousin to know: filter(orders, amount > 500) without dplyr does not say this. Base R has its own filter() (a time-series function), so the message is Error: object 'amount' not found — message 1 in disguise. Read the message, not your expectation.
4. Arithmetic on text.
> orders$prov * 2
Error in orders$prov * 2 : non-numeric argument to binary operator
A "binary operator" is + - * /; a "non-numeric argument" is a chr column. The usual way to meet this is not prov but an amount column that read as chr (L10.4) — orders$amount * 0.13 then fails with this message. Fix: str() the frame; convert the column with as.numeric().
The fifth: not an error at all
> mean(orders$amount
+
The prompt changes to + and nothing happens. The bracket is unclosed; R is waiting. Press Esc, close the bracket, run again. If a script "hangs" on a line, it is usually this.
Match message to cause
The figure is the table to memorise. The questions give a message and ask for its cause, with the other three causes as the distractors — the way the paper asks.
CRISP-DM: reading an error is not a phase; it is the skill that keeps every phase's script running.