How to find different elements of two time vectors?

前端 未结 2 626
面向向阳花
面向向阳花 2021-01-13 02:16

Considering these two time vectors:

a<-seq(as.POSIXct(\"2010-01-01 05:00:00\"), as.POSIXct(\"2010-01-02 23:55:00\"), by = \'5 min\')
b<-seq(as.POSIXct(         


        
2条回答
  •  迷失自我
    2021-01-13 02:58

    This uses only operations that preserve "POSIXct" class:

    c(a[!a %in% b], b[!b %in% a])
    

提交回复
热议问题