Hello,
I am trying to get the date column as class date. Some of the dates are converted others are converted into NA.
Could you please help me on this issue.
The following is my reprex:
pacman::p_load(rio, here, janitor, tidyverse, reprex, datapasta)
linelist <- data.frame(
stringsAsFactors = FALSE,
row.names = c("73","74","75","76","77",
"78","79","80","81","82","83","84","85"),
age = c(20, 14, 10, 13, 11, 2, 20, 1, 24, 18, 2, 35, 5),
sexe = c("F","F","M","F","F","F",
"M","F","F","M","F","F","F"),
date_consult = c(NA,NA,NA,NA,"2025-05-20",
"2025-05-20","2025-05-20","2025-05-22","2025-05-25",
"2025-05-25",NA,NA,NA),
date_sympt = c(NA,NA,NA,"2025-05-15",
"2025-05-16","2025-05-16","2025-05-14","2025-05-20",
"2025-05-22","2025-05-18","2025-05-25","2025-05-24",
"2025-05-29")
)
Thank you for your support
Created on 2025-06-05 with reprex v2.1.1