【发布时间】:2017-01-12 22:04:18
【问题描述】:
我想删除关键字中包含“计划”一词的行,除非还包含“广告”或“营销”。具体在样本数据集中,删除关键字包含“hr plan”和“operation plan”的行。
keyword <- c("advertising plan",
"advertising budget",
"marketing plan",
"marketing budget",
"hr plan",
"hr budget",
"operation plan",
"operation budget")
indicator <- c(1,0,0,1,1,1,0,1)
sample <- cbind(keyword,indicator)
【问题讨论】:
-
你可能从指标向量中遗漏了一些东西,它的长度不一样
-
感谢提醒
标签: r data-manipulation