gpt4 book ai didi

r - 在 R 中删除数据库中的日期

转载 作者:行者123 更新时间:2023-12-05 08:46:48 24 4
gpt4 key购买 nike

<分区>

如何删除 date2 列中的四月日期?这是一个小例子,但我有一个更大的数据库。那么,我能否快速完成此操作?

谢谢!

data <- structure(
list(Id=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),
date1 = c("2021-06-20","2021-06-20","2021-06-20","2021-06-20","2021-06-20",
"2021-06-20","2021-06-20","2021-06-20","2021-06-20","2021-06-20","2021-06-20",
"2021-06-20","2021-06-20","2021-06-20","2021-06-20","2021-06-20","2021-06-20",
"2021-06-20","2021-06-20","2021-06-20","2021-06-20"),
date2 = c("2021-07-01","2021-07-01","2021-07-01","2021-07-01","2021-04-02",
"2021-04-02","2021-06-02","2021-04-02","2021-04-02","2021-04-02","2021-04-03",
"2021-05-03","2021-06-03","2021-04-03","2021-04-03","2021-04-08","2021-04-08",
"2021-06-09","2021-05-09","2021-08-10","2021-06-10"),
DR01= c(4,5,6,7,3,2,7,4,2,1,2,3,4,6,7,8,4,2,6,4,3),DR02 = c(9,5,4,3,3,2,1,5,3,7,2,3,4,7,7,8,4,2,6,4,3)),
class = "data.frame", row.names = c(NA, -21L))

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com