timeMatch(spacetime)
timeMatch()所属R语言包:spacetime
match two (time) sequences
匹配两个序列(时间)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
match two (time) sequences, where each can
匹配(时间)序列,其中每罐
用法----------Usage----------
timeMatch(x, y, returnList = FALSE)
参数----------Arguments----------
参数:x
ordered sequence, e.g. of time stamps
排列的序列,例如时间标记
参数:y
ordered sequence, e.g. of time stamps
排列的序列,例如时间标记
参数:returnList
boolean; should a list be returned with all matches (TRUE), or a vector with single matches (FALSE)?
布尔,所有比赛(TRUE),或一个向量,其单场(FALSE)返回的列表吗?
Details
详细信息----------Details----------
timeIsInterval(x) and timeIsInterval(y) both need to be non-missing valued (i.e., TRUE or FALSE).
timeIsInterval(x)和timeIsInterval(y)都需要非缺失值(即TRUE或FALSE)。
Matching in case of no intervals is done on equality of values.
匹配的情况下,没有间隔是平等的价值观。
If x represents intervals, then the first interval is from x[1] to x[2], with x[1] included but x[2] not.
如果x代表的时间间隔,然后在第一个区间是从x[1]到x[2],x[1]但x[2]不包括。
值----------Value----------
if returnList = FALSE: integer vector of length length(x) with indexes of y matching to each of the elements of x, or NA if there is no match. See section details for definition of match.
如果returnList = FALSE:整数向量的长度length(x)指标y匹配的x的每个元素,或不适用,如果没有匹配。请参见细节相匹配的定义。
if returnList = TRUE: list of length length(x), with each list element an integer vector with all the indexes of y matching to that element of x.
如果returnList = TRUE:列表的长度length(x),每个列表元素,各项指标均y到,x的元素匹配的整数向量。
(作者)----------Author(s)----------
Edzer Pebesma
参见----------See Also----------
over
以上
实例----------Examples----------
t0 = as.POSIXct("1999-10-10")
x = t0 +c(0.5+c(2,2.1,4),5)*3600
y = t0 + 1:5 * 3600
x
y
timeIsInterval(x) = FALSE
timeIsInterval(y) = FALSE
timeMatch(x,y, returnList = FALSE)
timeMatch(x,y, returnList = TRUE)
timeIsInterval(y) = TRUE
timeMatch(x,y, returnList = FALSE)
timeMatch(x,y, returnList = TRUE)
timeIsInterval(x) = TRUE
timeMatch(x,y, returnList = FALSE)
timeMatch(x,y, returnList = TRUE)
timeIsInterval(y) = FALSE
timeMatch(x,y, returnList = FALSE)
timeMatch(x,y, returnList = TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|