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 <- 15:20 # Create some data objects
a\ # How to replicate the error message # Error: unexpected input in "a" |
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 |
a # Print a # 15 16 17 18 19 20