2014-07-18 40 views

回答

3

您可以使用grepl,逃離.

> tmp <- c("a", "a.b", "c", "c.g.g", "rr", "r.t") 
> grepl("\\.", tmp) 
[1] FALSE TRUE FALSE TRUE FALSE TRUE 
2

你可以使用grep

grep(".", tmp, fixed=TRUE)