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

In this R tutorial you’ll learn how to handle the error message “unexpected numeric constant in X”.

Example 1: Reproducing Error Message: “unexpected numeric constant in X”

""7        # How to replicate the error message
# Error: unexpected numeric constant in "7"

Example 2: Solving Error Message: “unexpected numeric constant in X”

7          # How to fix the error message
# 7

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