我的数据库中有一个字符串值
remove_geoms <- function(x, geom_type) {
# Find layers that match the requested type.
selector <- sapply(x$layers,
function(y) {
class(y$geom)[1] == geom_type
})
# Delete the layers.
x$layers[selector] <- NULL
x
}
我试过remove_stats <- function(x, stat_type) {
# Find layers that match the requested type.
selector <- sapply(x$layers,
function(y) {
class(y$stat)[1] == stat_type
})
# Delete the layers.
x$layers[selector] <- NULL
x
}
- 没有返回任何结果(预期)
然后我尝试dob: 2017-09-10 12:00:00
- 它返回了上述记录,即使我没有包含任何模式搜索。
请帮助我理解原因。