Why does as character return an integer on a list of dates

0 votes
I was surpirsed to see R do the following behaviour:

as.character(c(Sys.Date()))

#> [1] "2018-02-05"

as.character(list(Sys.Date()))

#> [1] "17567"

What causes this to occur? That is, clearly the "17567" is the result of as.integer(Sys.Date), but I do not follow the logic for why as.character(list(Sys.Date())) should wind up invoking as.integer().
Jul 14, 2022 in Data Science by avinash
• 1,840 points

edited Mar 4 20 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP