Convert Character String to Date Object in R (Example) | Year & Month | as.Date & paste Functions

preview_player
Показать описание
R code of this video:

my_dates <- c("2020-01", "2015-10", "2033-05") # Create example dates
my_dates # Print example dates

class(my_dates) # Check class

my_dates_new <- as.Date(paste(my_dates,"-01",sep="")) # Convert to date
my_dates_new # Print updated data

class(my_dates_new) # Check class

Follow me on Social Media:

Рекомендации по теме
join shbcf.ru