I have year, month, and day as separate numeric values and would like to create a date object. In most languages like C# or javascript I can do something like
let x=new Date(2010,11,19);
to initialize a date. What's the R equivalent of this? Obviously I can do
as.Date(paste0(year,'-',month,'-',day))
But it seems pointlessly dumb to convert to character in order to convert to date, right? Surely there is a way to cut out the unnecessary extra string conversion?