# load package
library(dplyr)
# example dataframe
patient = c(1,2,3)
days = c(500, 450, 600)
df <- as.data.frame(cbind(patient, days))
# calculate month
df <- df %>%
mutate(month = round(days/30.417, digit=0))
# show dataframe
View(df)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…