Sys.time()
[1] "2024-11-24 17:37:27 CST"
a <- Sys.time()
a
[1] "2024-11-24 17:39:37 CST"
a$yday
错误于a$yday: $ operator is invalid for atomic vectors,这个为什么错了啊,我用strptime函数可以啊
batime<-strptime(x=bd,format='%Y-%m-%d %H:%M:%S',tz="Asia/Shanghai")
batime
[1] "1996-10-01 20:30:00 CST"
batime$yday
[1] 274