seq.POSIXt(base)
seq.POSIXt()所属R语言包:base
Generate Regular Sequences of Times
生成定期时代序列
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The method for seq for date-time classes.
seq日期时间类的方法。
用法----------Usage----------
## S3 method for class 'POSIXt'
seq(from, to, by, length.out = NULL, along.with = NULL, ...)
参数----------Arguments----------
参数:from
starting date. Required.
起始日期。必需的。
参数:to
end date. Optional.
结束日期。可选的。
参数:by
increment of the sequence. Optional. See "Details".
增量的序列。可选的。见“详细资料”。
参数:length.out
integer, optional. Desired length of the sequence.
整数,可选。所需序列的长度。
参数:along.with
take the length from the length of this argument.
从这一论点的长度的长度。
参数:...
arguments passed to or from other methods.
参数传递或其他方法。
Details
详情----------Details----------
by can be specified in several ways.
by可以指定在几个方面。
A number, taken to be in seconds.
一个数字,是在几秒钟内。
A object of class difftime
一个对象的类difftime
A character string, containing one of "sec", "min", "hour", "day", "DSTday", "week", "month" or "year". This can optionally be preceded by a (positive or negative) integer and a space, or followed by "s".
一个字符串,包含"sec"之一,"min","hour","day","DSTday","week","month"或 "year"。这可以选择之前(正或负)整数和一个空间,或"s"。
The difference between "day" and "DSTday" is that the former ignores changes to/from daylight savings time and the latter takes the same clock time each day. ("week" ignores DST (it is a period of 144 hours), but "7 DSTdays") can be used as an alternative. "month" and "year" allow for DST.)
之间的区别"day"和"DSTday"是前者忽略夏令时更改/,而后者则需要每天在相同的时钟时间。 ("week"忽略夏令时(这是一段时间144小时),但可以作为一种替代使用"7 DSTdays")。 "month"和"year"允许夏令时。)
The timezone of the result is taken from from: remember that GMT means UTC (and not the timezone of Greenwich, England) and so does not have daylight savings time.
取自from:记得时间的手段UTC(而不是英国格林威治时区),所以没有日光节约时间的时区。
Using "month" first advances the month without changing the day: if this results in an invalid day of the month, it is counted forward into the next month: see the examples.
一天不改变"month"每月的第一个进步:如果这个结果在本月的无效一天,它被计入下个月提出:见的例子。
值----------Value----------
A vector of class "POSIXct".
一类"POSIXct"向量。
参见----------See Also----------
DateTimeClasses
DateTimeClasses
举例----------Examples----------
## first days of years[#年的第一天]
seq(ISOdate(1910,1,1), ISOdate(1999,1,1), "years")
## by month[#月份]
seq(ISOdate(2000,1,1), by = "month", length.out = 12)
seq(ISOdate(2000,1,31), by = "month", length.out = 4)
## quarters[#宿舍]
seq(ISOdate(1990,1,1), ISOdate(2000,1,1), by = "3 months")
## days vs DSTdays: use c() to lose the timezone.[天vs DSTdays:使用c()失去的时区。]
seq(c(ISOdate(2000,3,20)), by = "day", length.out = 10)
seq(c(ISOdate(2000,3,20)), by = "DSTday", length.out = 10)
seq(c(ISOdate(2000,3,20)), by = "7 DSTdays", length.out = 4)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|