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

In this R tutorial you’ll learn how to deal with the error message “unexpected input in X”.

Example 1: Reproducing Error Message – “unexpected input in X”

a <- 15:20        # Create some data objects
a\                # How to replicate the error message
# Error: unexpected input in "a"

Example 2: Solving the Error: “unexpected input in X”

a                 # Print a
# 15 16 17 18 19 20

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