How to Solve the R Error – Unexpected Symbol in Code (2 Examples)

In this post, I’ll explain how to solve the error “unexpected symbol in X” in R.

Example 1: Reproducing Error Message

a <- 5         # Create some data objects
b <- 8
a b            # How to reproduce the error message
# Error: unexpected symbol in "a b"

Example 2: Solving Error Message – “unexpected symbol in X”

a * b          # Inserting operator between symbols
# 40

Leave a Reply

Your email address will not be published.

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top