hist.POSIXt(graphics)
hist.POSIXt()所属R语言包:graphics
Histogram of a Date or Date-Time Object
直方图的日期或日期时间对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Method for hist applied to date or date-time objects.
hist申请日期或日期时间对象的方法。
用法----------Usage----------
## S3 method for class 'POSIXt'
hist(x, breaks, ...,
xlab = deparse(substitute(x)),
plot = TRUE, freq = FALSE,
start.on.monday = TRUE, format)
## S3 method for class 'Date'
hist(x, breaks, ...,
xlab = deparse(substitute(x)),
plot = TRUE, freq = FALSE,
start.on.monday = TRUE, format)
参数----------Arguments----------
参数:x
an object inheriting from class "POSIXt" or "Date".
从类对象继承"POSIXt"或"Date"。
参数:breaks
a vector of cut points or number giving the number of intervals which x is to be cut into or an interval specification, one of "days", "weeks", "months", "quarters" or "years", plus "secs", "mins", "hours" for date-time objects.
一个切点,或给予的间隔数数量的向量x是要减少或间隔规范,"days","weeks","months","quarters"或"years"加"secs","mins","hours"日期时间对象。
参数:...
graphical parameters, or arguments to hist.default such as include.lowest, right and labels.
图形参数,或参数hist.defaultinclude.lowest的right和labels。
参数:xlab
a character string giving the label for the x axis, if plotted.
给X轴的标签,如果绘制一个字符串。
参数:plot
logical. If TRUE (default), a histogram is plotted, otherwise a list of breaks and counts is returned.
逻辑。如果TRUE(默认),绘制直方图,否则返回中断和计数的列表。
参数:freq
logical; if TRUE, the histogram graphic is a representation of frequencies, i.e, the counts component of the result; if FALSE, relative frequencies (probabilities) are plotted.
逻辑;如果TRUE,直方图图形是表示频率,即counts结果的组成部分,如果FALSE,相对频率(概率)绘制。
参数:start.on.monday
logical. If breaks = "weeks", should the week start on Mondays or Sundays?
逻辑。如果breaks = "weeks",应该一周的星期一或星期日开始?
参数:format
for the x-axis labels. See strptime.
为x轴的标签。看到strptime。
Details
详情----------Details----------
Note that unlike the default method, breaks is a required argument.
请注意,默认的方法不同,breaks是一个必需的参数。
Using breaks = "quarters" will create intervals of 3 calendar months, with the intervals beginning on January 1, April 1, July 1 or October 1, based upon min(x) as appropriate.
使用breaks = "quarters"将创建3个日历月的时间间隔,开始于1月1日,4月1日,7月1日或10月1日,根据经min(x)适当的间隔。
值----------Value----------
An object of class "histogram": see hist.
一个类的对象"histogram":看到hist。
参见----------See Also----------
seq.POSIXt, axis.POSIXct, hist
seq.POSIXt,axis.POSIXct,hist
举例----------Examples----------
hist(.leap.seconds, "years", freq = TRUE)
hist(.leap.seconds,
seq(ISOdate(1970, 1, 1), ISOdate(2010, 1, 1), "5 years"))
## 100 random dates in a 10-week period[#100日期在10个星期的时间内随机]
random.dates <- as.Date("2001/1/1") + 70*stats::runif(100)
hist(random.dates, "weeks", format = "%d %b")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|