I am doing
m <- grepl("T00:",test$timestamp)
table(m)
and output is
m
#FALSE TRUE
#966 33
I want to assign the value 33 to a variable.. How to do that??
You can use
new_var <- table(m)["TRUE"]
to extract the value 33
.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句