R Error in as.Date.numeric: Origin must be Supplied (2 Examples)

This article explains how to deal with the error message in as.Date.numeric(X) : ‘origin’ must be supplied in R.

Example 1: Replicating the Error Message in as.Date.numeric: ‘origin’ must be supplied

as.Date(22222)        # Applying as.Date without origin
# Error in as.Date.numeric(22222) : 'origin' must be supplied

Example 2: Solving the Error Message in as.Date.numeric: ‘origin’ must be supplied

as.Date(22222,        # Applying as.Date with origin
        origin = "1960-01-01")
# "2020-11-03"

Leave a Reply

Your email address will not be published. Required fields are marked *

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