fuzzyMatches(HELP)
fuzzyMatches()所属R语言包:HELP
Fuzzy matching
模糊匹配
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Match and reinterpret a vector in terms of a second vector, essentially using the second vector as a key to interpret the first.
第二个向量的匹配和重新诠释的一个向量,基本上是使用第二个向量作为重点来解释第一。
用法----------Usage----------
fuzzyMatches(x, y, ...)
参数----------Arguments----------
参数:x
vector, the values to be matched.
向量,要匹配的值。
参数:y
vector, the values to be matched against.
向量,要匹配的值。
参数:...
Arguments to be passed to methods (see getSamples-methods):
被传递到方法的参数(见getSamples-methods):
strict logical indicating whether or not to allow restrict matching. If FALSE, numerical indices in x can reference values in y. If TRUE (default), only exact matches of values in x and y will be used.
strict逻辑表示是否允许限制匹配。如果FALSE,数值指数x的可以在y引用值。如果TRUE(默认),只有精确值x和y将用于匹配。
keep logical indicating whether or not to preserve non-matching values from x (when strict = FALSE). If TRUE (default), all values in x will be returned with those that match values in y replaced by the corresponding values in y. If FALSE, non-matching values will be removed.
keep逻辑指示是否保留非匹配值从x(strict = FALSE)。如果TRUE(默认),所有值x将与这些返回的匹配值yy的相应值取代。如果FALSE,不匹配的值将被删除。
alias logical indicating whether or not to return aliased values (default is TRUE). If FALSE, numerical indices will be returned with a value of nomatch for non-matching values in x.
alias逻辑指示是否返回别名值(默认是TRUE)。如果FALSE,数值指标将返回一个nomatchx的非匹配值的价值。
match.all character value, specifying a special value to be interpreted as a match for ALL values in y (default is "*"). Any occurence of match.all in x will be replaced by all values in y.
match.all y(默认是"*")字符值,指定一个特殊的值被解释作为比赛中的所有值。任何的发生match.allx将取代所有的值在y。
nomatch numerical, specifying a value for non-matching values in codex when strict = FALSE, keep = TRUE, and alias = FALSE.
nomatch数值,在食品法典委员会指定的非匹配值的值的时候strict = FALSE,keep = TRUE和alias = FALSE。
na.rm a logical value indicating whether NA values should be stripped before the computation proceeds (default is TRUE). If FALSE any missing values in x will cause an error and missing values in codey may cause unexpected behavior.
na.rm一个逻辑值,指示是否适用值前应计算收益(默认是TRUE)剥离。如果FALSE任何遗漏值在x将导致错误和寇迪失踪的值可能会导致意外的行为。
\dots other arguments not handled at this time.
\dots其他参数没有在这个时间处理。
Details
详情----------Details----------
This function employs multiple stages of matching between two vectors. First, the values in x are matched against y to find any exact matches. Next, numerical values in x are used to retrieve the corresponding positions in y. All unmatched values may be retained or dropped (depending on the value of keep), and a list of unique values is returned. Note that a value of match.all in x will be interpreted as a match for ALL values in y, and therefore replaced with the contents of y.
此功能采用多阶段两个向量之间的匹配。首先,在值x是匹配y找到任何精确的匹配。下一步,在x是用来检索y的相应位置的数值。所有的无与伦比的价值,可以保留或下降,唯一值的列表(上keep值而定),则返回。需要注意的是一种价值match.all在x将被解释作为匹配所有值在y,与y的内容,因此取代。
值----------Value----------
Returns a vector of unique values in x, that match values in y according to the parameters described above.
在x返回一个唯一值的向量,匹配值在y根据以上所述的参数。
作者(S)----------Author(s)----------
Reid F. Thompson (<a href="mailto:rthompso@aecom.yu.edu">rthompso@aecom.yu.edu</a>)
参见----------See Also----------
fuzzyMatches-methods, match
fuzzyMatches-methods,match
举例----------Examples----------
a <- c(1, "four", "missing")
b <- c("one", "two", "three", "four")
fuzzyMatches(a, b)
fuzzyMatches(a, b, strict=FALSE)
fuzzyMatches(a, b, strict=FALSE, alias=FALSE)
fuzzyMatches(a, b, strict=FALSE, keep=FALSE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|