Get Started →
Syntax Errors

Unexpected symbol

Matches: unexpected symbol in

WHAT THIS ERROR MEANS

R found two symbols next to each other without an operator or separator between them. Common cause: missing comma, pipe, or operator.

HOW TO FIX IT

1. Look for missing commas between function arguments.

2. Check for missing operators (+, -, *, |>, %>%).

3. Variable names cannot contain spaces.

CODE EXAMPLES

BAD — THIS CAUSES THE ERROR
my data <- c(1, 2, 3)
GOOD — CORRECT APPROACH
my_data <- c(1, 2, 3)

Still stuck?

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

Try RChat Free →

RELATED SYNTAX ERRORS