read.spc(zipfR)
read.spc()所属R语言包:zipfR
Loading and Saving Frequency Spectra (zipfR)
加载和保存频率谱(zipfR)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
read.spc loads frequency spectrum from .spc file
read.spc.spc文件加载频谱
write.spc saves frequency spectrum object in .spc file
write.spc节省频谱.spc文件中的对象
用法----------Usage----------
read.spc(file)
write.spc(spc, file)
参数----------Arguments----------
参数:file
character string specifying the pathname of a disk file. Files with extension .gz will automatically be compressed/decompressed. See section "Format" for a description of the required file format
字符串指定的磁盘文件的路径名。文件与扩展.gz将自动压缩/解压缩。为所需的文件格式的描述,请参见“格式”
参数:spc
a frequency spectrum, i.e.\ an object of class spc
的频谱,即\类的一个对象spc
格式----------Format----------
A TAB-delimited text file with column headers but no row names (suitable for reading with read.delim). The file must contain at least the following two columns:
制表符分隔的文本文件,列标题,但没有行名称(适合阅读read.delim)。该文件必须至少包含以下两列:
m frequency class m
m频度等级m
Vm number V_m of types in frequency class
Vm数V_m类型的频度等级
An optional column labelled VVm can be used to specify variances of expected class sizes (for a frequency spectrum derived from a LNRE model or by binomial interpolation).
一个可选的列标记VVm可以用来指定预期类大小(从一个LNRE的模型或二项式插值的衍生的频谱)的方差。
These columns may appear in any order in the text file. All other columns will be silently ignored.
这些列中可能出现的任何命令的文本文件。所有其他列会被忽略。
Details
详细信息----------Details----------
If the filename file ends in the extension .gz, the disk file will automatically be decompressed (read.spc) and compressed (write.spc).
如果文件名file结束在延长.gz,磁盘文件会自动解压缩(read.spc)和压缩(write.spc)。
The .spc file format does not store the values of N, V and VV explicitly. Therefore, incomplete frequency spectra and expected spectra with variances cannot be fully reconstructed from disk files. Saving such frequency spectra (or loading a spectrum with variance data) will trigger corresponding warnings.
.spc文件格式不存储N,V和VV明确的值。因此,不完整的频谱和预期的差异光谱与不能被完全重建从磁盘文件。保存,这种频谱(或方差数据加载频谱),将触发相应的警告。
值----------Value----------
read.spc returns an object of class spc (see the spc manpage for details)
read.spc返回一个对象类spc(spc联机帮助的详细信息)
参见----------See Also----------
See the spc manpage for details on spc objects. See read.tfl and read.vgc for import/export of other data structures.
spc对象的详细信息,请参阅“spc的联机帮助页。见read.tfl和read.vgc的其他数据结构的导入/导出的。
实例----------Examples----------
## Not run: [#不运行:]
## examples will not be run during package compilation[#示例将不会运行在包编译]
## since they would require accessing and writing to[#,因为他们需要访问和写入]
## external files[#外部文件]
## load Italian ultra- data[#加载意大利的超数据]
## and write corresponding spectrum to external text file[#和外部文本文件中写入相应的频谱]
data(ItaUltra.spc)
write.spc(ItaUltra.spc,"ultra.spc")
## now ultra.spc is a text file with columns m and Vm[现在ultra.spc是一个文本文件,列m和Vm]
## we ready it back in[#我们准备回]
New.spc <- read.spc("ultra.spc")
## same spectrum as ItaUltra.spc, compare:[#相同的频谱为ItaUltra.spc,比较:]
summary(New.spc)
summary(ItaUltra.spc)
## DON'T do the following, incomplete spectrum will not be[#不要做以下的,不完整的频谱将不会]
## restored properly!!![#正确还原!]
zm <- lnre("zm",ItaUltra.spc) # estimate model[估计模型]
zm.spc <- lnre.spc(zm,N(zm)) # incomplete spectrum from model[不完整的光谱模型]
write.spc(zm.spc,"var.spc") # warnings[警告]
bad.spc <- read.spc("/Users/baroni/Desktop/var.spc")
## latter is DIFFERENT from zm.spc!!![后者是不同zm.spc的!]
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|