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

R语言 zoo包 na.trim()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-10-2 07:53:23 | 显示全部楼层 |阅读模式
na.trim(zoo)
na.trim()所属R语言包:zoo

                                        Trim Leading/Trailing Missing Observations
                                         修剪引导/尾随失踪观察

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

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

Generic function for removing leading and trailing NAs.
为,删除前导,尾随的NA的通用功能。


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


na.trim(object, ...)
## Default S3 method:[默认方法]
na.trim(object, sides = c("both", "left", "right"),
        is.na = c("any", "all"), ...)



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

参数:object
an object.
一个对象。


参数:sides
character specifying whether NAs are to be removed from both sides, just from the left side or just from the right side.
字符,指定是否NA的双方都将被删除,只是从左侧或从右侧。


参数:is.na
If "any" then a row will be regarded as NA if it has any NAs.  If "all" then a row will be regarded as NA only if all elements in the row are NA.  For one dimensional zoo objects this argument has no effect.
如果“任何”,然后一排将被视为NA如果有任何NA的。如果“所有”,然后一排将被视为NA,只有当所有的元素在该行是NA。为维动物园对象之一,这种说法有没有影响。


参数:...
further arguments passed to methods.
进一步的参数传递给方法。


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

An object in which leading and/or trailing NAs have been removed.
领导和/或尾随的NA的已被删除的对象。


参见----------See Also----------

na.approx, na.contiguous, na.locf, na.omit, na.spline, stinterp, zoo
na.approx,na.contiguous,na.locf,na.omit,na.spline,stinterp,zoo


实例----------Examples----------


# examples of na.trim[例子na.trim]
x <- zoo(c(1, 4, 6), c(2, 4, 6))
xx <- zoo(matrix(c(1, 4, 6, NA, 5, 7), 3), c(2, 4, 6))
na.trim(x)
na.trim(xx)

# using na.trim for alignment[对齐使用na.trim的]
# cal defines the legal dates[CAL定义的合法日期]
# all dates within the date range of x should be present[应该是目前所有日期的日期范围内的X]
cal <- zoo(,c(1, 2, 3, 6, 7))
x <- zoo(c(12, 16), c(2, 6))
na.trim(merge(x, cal))


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-13 16:13 , Processed in 0.021923 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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