标签: r
我如何使用R来确定单词" RED"发生在以下数组中:
test <- c("RED","WHITE","RED","RED")
答案 0 :(得分:1)
以下是我的回答:
sum(test == "RED") [1] 3