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

R语言 Streamer包 NetCDFInput-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-26 15:14:26 | 显示全部楼层 |阅读模式
NetCDFInput-class(Streamer)
NetCDFInput-class()所属R语言包:Streamer

                                        Class "NetCDFInput"
                                         类“NetCDFInput”

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

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

A NetCDFInput-class to retrieve data store in NetCDF files. Users interact with this class through the constructor NetCDFInput and methods yield, status, and reset.
一个NetCDFInput类来检索数据存储在NetCDF文件。用户交互通过这个类的构造NetCDFInput和方法yield,status,reset。


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


NetCDFInput(ncdf, var, slice, ..., verbose = FALSE)
## S4 method for signature 'NetCDFInput'
dimensions(x, ...)



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

参数:ncdf
An object of class NetCDFFile rrepresenting the file from which data is to be read.
一个类的对象NetCDFFile的rrepresenting文件要读取数据。


参数:var
A character(1) string naming the variable to be read from the NetCDF file.
一个character(1)从netCDF文件读取的变量命名的字符串。


参数:slice
A named integer vector specifying the slice to be iterated over. The names correspond to dimensions of var, the values to the number of elements to be retrieved with each yield.
指定要遍历片的命名整数向量。名称对应尺寸var,值的元素的数量,每个yield检索。


参数:...
Additional arguments, passed to the $new method of this class. Currently ignored.
额外的参数传递$new这个类的方法。目前被忽略。


参数:verbose
logical(1) indicating whether class methods should report to the user.
logical(1)类的方法是否应该报告给用户。


参数:x
An instance of the NetCDFInput class.
NetCDFInput类的一个实例。


类的方法----------Class Methods----------




dimensions(): Return the dimensions associated with
dimensions():返回与尺寸




yield(): Processes the NetCDF file and retrieves a matrix of data from the NetCDF file corresponding to the slice size that has been set.  Repeated calls to the yield function retrieves the next block of data until the end of file
yield():进程的netCDF文件和检索从netCDF文件片的大小已设置相应的数据矩阵。千呼万唤yield函数检索下一个数据块,直到文件结束




reset(): Resets the cursor that tracks the next block
reset():重置光标跟踪下一个块




status(): Returns a named numeric vector for the position of the start of the block from which data will be read
status():返回从其中读取数据块开始的位置,一个名为数字向量


类的内部字段:(开发人员)----------Class Internal Fields: (For developers)----------




ncdf: An object of class NetCDFFile from which
ncdf类NetCDFFile的对象




name: A character(1) specifying the name of
name:一个character(1)指定的名称




slice: A named numeric vector specifying the size of the chunk of data that will be retrived along each dimension using
slice:一个名为数字指定的数据块大小的向量,将沿着每个维度retrived




start: A named numeric vector specifying the position along each dimension from which data will start to be read for the
start:一个名为数字矢量沿着每个维度指定的位置,从该数据将开始进行阅读




verbose: Report messages from evalaution?
verbose:从evalaution报告的消息?


类的内部方法:(对于开发人员)----------Class Internal Methods: (For developers)----------




initialize(ncdf, var, slice, ..., verbose): Called
initialize(ncdf, var, slice, ..., verbose):调用




yield(): Processes the NetCDF file and retrieves a block of data from the NetCDF file corresponding to the slice size that has been set.  Repeated calls to the yield function retrieves the next block of data until the end of file has been
yield():处理netCDF文件和检索从netCDF文件片的大小已设置相应的数据块。千呼万唤yield函数检索下一个数据块,直到文件结束一直




reset(): Resets the cursor that tracks the next block
reset():重置光标跟踪下一个块




status(): Retrieves the position of the start of the block from which data will be read for the next call to the
status():检索从该数据将读取到下一次调用块开始的位置




.getCounts(): Retrieve the dimensions of the next
.getCounts():找回下一代的尺寸




.getNextStart(): Retrieve coordinates at which next
.getNextStart():找回在哪个坐标下


作者(S)----------Author(s)----------


Nishant Gopalakrishnan <a href="ngopalak@fhcrc.org">ngopalak@fhcrc.org</a>



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

NetCDFFile
NetCDFFile


举例----------Examples----------


## Not run: [#无法运行:]
    showClass("NetCDFInput")

pth <- system.file("extdata", "NetCDFData.nc", package = "Streamer")
ncFile <- NetCDFFile(pth)
dimensions(ncFile)                # variable names and dimensions[变量的名称和尺寸]

ncProd <- NetCDFInput(ncFile, "2dIntData", c(sampleDim=5, snpDim=2))
yield(ncProd)
status(ncProd)
reset(ncProd)
yield(ncProd)

## End(Not run)[#结束(不运行)]


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 09:25 , Processed in 0.024247 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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