Returns number of levels associated with an object
返回的层次与对象相关联的数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function returns the number of scale levels associated with either a wavelet type object or an atomic object.
这个函数返回的小波类型的对象或一个原子对象的数量规模水平。
用法----------Usage----------
## Default S3 method:[默认方法]
nlevels(object, ...)
参数----------Arguments----------
参数:object
An object for which you wish to determine how many levels it has or is associated with.
的对象,你要确定有多少水平,或者与。
参数:...
any other arguments
任何其他参数
Details
详细信息----------Details----------
This function first checks to see whether the input object has a component called nlevels. If it does then it returns the value of this component. If it does not then it takes the length of the object and then uses the IsPowerOfTwo function to return the power of two which equals the length (if any) or NA if the length of the object is not a power of two.
这个函数首先会检查是否输入对象有一种成分叫做NLEVELS。如果是的话,则返回值的这一部分。如果没有,那么它需要的对象的长度,然后使用IsPowerOfTwo函数返回电源的两个相等的长度(如有)或NA如果两个长度的对象是不是一个权力。
值----------Value----------
The number of resolution (scale) levels associated with the object.
与该对象相关联的分辨率(尺度)水平的数目。
(作者)----------Author(s)----------
Version 3.6.0 Copyright Guy Nason 1995
参见----------See Also----------
nlevels
nlevels
实例----------Examples----------
#[]
# Generate some test data [生成一些测试数据。]
#[]
test.data <- example.1()$y
#[]
# Now, this vector is 512 elements long. What number of levels would any[现在,该矢量的长度是512个元素。什么样的水平会任何]
# wavelet object be that was associated with this vector?[小波对象与此向量?]
#[]
nlevels(test.data)
# [1] 9[[1] 9]
#[]
# I.e. 2^9=512. Let's check by taking the wavelet transform of the[即2 ^ 9 = 512。让我们来看看小波变换的]
# test data and seeing how many levels it actually has[测试数据,并看到它实际上有多少级]
#[]
nlevels(wd(test.data))
# [1] 9[[1] 9]