找回密码
 注册
查看: 744|回复: 0

R语言 tis包 holidays()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-10-1 10:36:28 | 显示全部楼层 |阅读模式
holidays(tis)
holidays()所属R语言包:tis

                                        Holidays
                                         假期

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Functions that know about Federal and FRB (Federal Reserve Board) holidays.
知道联邦和联邦储备委员会(联邦储备委员会)假期的函数。


用法----------Usage----------


nextBusinessDay(x, holidays = NULL, goodFriday = F, board = F, inaug = board)
previousBusinessDay(x, holidays = NULL, goodFriday = F, board = F, inaug = board)
isHoliday(x, goodFriday = F, board = F, inaug = board, businessOnly = T)
isGoodFriday(x)
isEaster(x)
holidays(years, goodFriday = F, board = F, inaug = board, businessOnly = T)
federalHolidays(years, board = F, businessOnly = T)
goodFriday(years)
easter(years)
inaugurationDay(years)
holidaysBetween(startTi, endTi, goodFriday = F, board = F, inaug = board, businessOnly = T)



参数----------Arguments----------

参数:x
a ti time index, or something that can be turned into one, such as a yyyymmdd number or a Date object.
ti时间指数,或东西,可以变成一个,如一个YYYYMMDD或Date对象。


参数:holidays
a vector of holidays (in yyyymmdd form) to skip over, or NULL. In the latter case, the holidays function is used to determine days to skip over.  
假期(以YYYYMMDD表格)的向量跳过,或NULL。在后者的情况下,holidays函数是用来确定天跳过。


参数:goodFriday
if TRUE, consider Good Friday as a holiday. Default is FALSE because Good Friday is not a federal holiday.
如果TRUE,认为耶稣受难日假期。默认是FALSE因为耶稣受难日是一个联邦假日。


参数:board
if TRUE, the Friday preceding a Saturday NewYears, Independence, Veterans or Christmas Day is considered a holiday.
如果TRUE,在星期五星期六NewYears,独立,退伍军人或圣诞节前被认为是一个节日。


参数:inaug
if TRUE, consider the U.S. Presidential Inauguration Day to be a holiday, but only if it falls on a weekday.
如果TRUE,认为美国总统就职日是一个节日,但只有当它落在一个工作日。


参数:businessOnly
if TRUE (the default), ignore Saturday NewYears, Independence, Veterans amd Christmas Day holidays.  Has no effect if board is TRUE, since that moves Saturday holidays to Friday.
如果TRUE(默认值),忽略星期六NewYears的退伍军人,独立,AMD圣诞节假期。有没有效果,如果board是TRUE,因为移动至周五周六假期。


参数:years
numeric vector of 4 digit years
4位数字表示年份的数字矢量


参数:startTi
a daily ti time index, or something that can be turned into one
每天ti时间指数,或东西,可以变成一个


参数:endTi
a daily ti time index, or something that can be turned into one
每天ti时间指数,或东西,可以变成一个


Details

详细信息----------Details----------

Federal law defines 10 holidays. Four of them, NewYears, Independence, Veterans and Christmas, fall on the same date every year. The other six fall on particular days of the week and months (MLK, Presidents, Memorial, Labor, Columbus, and Thanksgiving).
联邦法律规定了10个假期。四,NewYears,独立,退伍军人和圣诞节,落在同日每年。其他六个在一周的某几天和几个月下降(MLK,总统纪念堂,劳动,哥伦布,感恩节)。

If one of the four fixed-date holidays falls on a Sunday, the federal holiday is celebrated the next day (Monday).  If it falls on a Saturday, the preceding day (Friday) is a holiday for the Federal Reserve Board, but not for the Reserve Banks and the banking system as a whole.
如果一个人的四个固定日期假期适逢在星期日,联邦节日,是庆祝第二天(星期一)。如果恰逢周六,前一天(星期五)美国联邦储备委员会的节日,但不是储备银行和金融系统作为一个整体。

Presidential Inauguration day is a Federal holiday only in the DC area, and then only if it falls on a weekday, so it is not included in the holidays returned by federalHolidays, but it can be included in several of the other functions by setting the inaug argument to TRUE.
总统就职典礼日是美国联邦假期,仅在华盛顿区域,然后只有当它落在一个工作日,因此不包括在假期返回federalHolidays,但它可以被列入的其他几个功能通过设置inaug参数,TRUE的。


值----------Value----------

nextBusinessDay and previousBusinessDay return "business" frequency ti objects.
nextBusinessDay和previousBusinessDay回报“的经营”频率ti对象。

isHoliday, isGoodFriday and isEaster return Boolean vectors as long as x.
isHoliday,isGoodFriday和isEaster返回布尔值向量,只要x。

easter and goodFriday return numeric vectors of yyyymmdd dates of the appropiate holidays for each year in the years argument.
easter和goodFriday返回数字yyyymmdd的日期,每年在适当的假期years参数向量。

inaugurationDay returns a numeric vector of yyyymmdd dates of U.S. Presidential Inauguration Days, if any, that fall in the years given in the years argument.  
inaugurationDay返回一个数字矢量的美国总统就职日yyyymmdd的日期,如果有的话,那年秋天在未来几年years参数。

federalHolidays returns a numeric vector of yyyymmdd dates for the federal holidays for each year in years.  The names attribute of the returned vector contains the holiday names.
federalHolidays返回一个数字矢量yyyymmdd的日期为每年的联邦假日years。 names属性返回的向量包含了节日的名称。

holidays returns a vector like federalHolidays does. The only difference between the two functions is that holidays has the option of including Good Fridays.
holidays返回一个矢量,像federalHolidays。这两个函数之间的唯一区别是holidays的选项,包括良好的周五。

holidaysBetween returns a vector of yyyymmdd dates for holidays that fall within the time spanned by [startTi, endTi].
holidaysBetweenyyyymmdd的日期为假期的时间内跨越的[startTi, endTi]返回一个向量。


注意----------Note----------

The algorithm for finding Easter dates was found somewhere on the web (I don't remember where) and is unbelievably complex.  It would probably be simpler to just celebrate the home opener of the Cleveland Indians instead.
寻找复活节日期的算法在网络上被发现的地方(我不记得在哪里),是令人难以置信的复杂。它可能是简单的克里夫兰印地安人的主场揭幕战,而不是刚刚庆祝。

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-23 20:11 , Processed in 0.034669 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表