#用openxlsx導入的日期編程距離1900年的天數(shù)
startday<-as.Date('1900-01-01')
today<-as.Date('2018-01-01')
long<-today-startday
age<-round(long-a$出生日期)/365)
a$出生日期<-age
#用CSV導入的日期為因子型,轉(zhuǎn)變?yōu)闀r間型
birtyday<-as.Date(a$出生日期)
today<-as.Date('2017-01-01')
age<-round((today-birthday)/365)