eu tenho esses dados
sg2<-structure(list(`Last prescription/or progression time (if progressed)` = c("23-11-2021",
"28-09-2022", "45020", "45079", "23-05-2023"), time = c(3.682191781,
9.008219178, 22.52054795, 20.02191781, 12.7890411), status = c(0,
0, 0, 0, 0), `Number of bone lesions (<5 = “<5”, >=5 = “≥5”) (clear, multiple bone metastases ≥5 are defined)` = c(">=5",
"<5", ">=5", ">=5", "<5")), row.names = c(NA, -5L), class = c("tbl_df",
"tbl", "data.frame"))
e alguns dos meus dados de datas são exibidos como 44383, por exemplo, enquanto outras datas são carregadas normalmente do meu arquivo Excel. Tento convertê-los todos para as datas abaixo, mas recebo datas como NAs
sg2$`Time of first prescription of denosumab (if enrolled in QL1206 and JMT, this time is the time of first use of XGEVA after leaving the group)` <- as.Date(as.numeric(sg2$`Time of first prescription of denosumab (if enrolled in QL1206 and JMT, this time is the time of first use of XGEVA after leaving the group)`), origin = "1899-12-30")
Warning message:
In as.Date(as.numeric(sg2$`Time of first prescription of denosumab (if enrolled in QL1206 and JMT, this time is the time of first use of XGEVA after leaving the group)`), :
NAs introduced by coercion
Por favor, tente o código abaixo