like(genomes)
like()所属R语言包:genomes
Pattern matching using wildcards
使用通配符模式匹配
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Pattern matching using wildcards
使用通配符模式匹配
用法----------Usage----------
x %like% pattern
参数----------Arguments----------
参数:pattern
character string containing the pattern to be matched
包含要匹配的字符串
参数:x
values to be matched
匹配的值
Details
详情----------Details----------
Only wildcards matching a single character '?' or zero or more characters '*' are allowed. Matches are case-insensitive. The pattern is first converted to a regular expression using glob2rx then matched to values in x using grep.
只有通配符匹配单个字符?或零个或多个字符*是允许的。比赛是不区分大小写。该模式是先转换成一个正则表达式使用glob2rxx用grep然后匹配值。
This is a shortcut for a commonly used expression found in the subset example where nm %in% grep("^M", nm, value=TRUE) simplifies to nm %like% 'M*'.
这是一个快捷方式在subset比如nm %in% grep("^M", nm, value=TRUE)简化nm %like% 'M*'发现了一个常用的表达。
值----------Value----------
A logical vector indicating if there is a match or not. This will mostly be useful in conjunction with the subset function.
逻辑向量表示,如果有一个匹配或不。这将主要是有用的subset函数的结合。
作者(S)----------Author(s)----------
Chris Stubben
参见----------See Also----------
grep, glob2rx, subset
grep,glob2rx,subset
举例----------Examples----------
data(lproks)
subset(lproks, name %like% 'Yersinia*', c(name, released))
# also works with date or numeric fields[也可以用日期或数字领域]
subset(lproks, released %like% '2008-01*', c(name, released))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|