我需要根据不包含某些字符串来对数据帧进行子集化。我的数据框如下:
dput(dd)
structure(list(TimeStamp = structure(1:3, .Label = c("2016-04-18 00:30:00",
"2016-04-18 01:10:00", "2016-04-18 01:20:00"), class = "factor"),
User = structure(c(3L, 2L, 1L), .Label = c("App", "Error",
"Web"), class = "factor")), .Names = c("TimeStamp", "User"
), row.names = c(NA, -3L), class = "data.frame")
当我尝试这个时:
dd[dd$User !=grep("Err*", dd),]
我得到一个空数据框。我需要能够使用grep。