read.write(TRAMPR)
read.write()所属R语言包:TRAMPR
Read/Write TRAMPknowns and TRAMPsamples Objects
读/写TRAMPknowns,和TRAMPsamples对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Saves and loads TRAMPknowns and TRAMPsamples objects as a series of “csv” (comma separated value) files for external editing.
保存和载入TRAMPknowns和TRAMPsamples对象的一系列的“CSV(逗号分隔值)文件的外部编辑。
If you do not want to edit your data, then saving with save is preferable; it is faster, creates smaller files, and will save any additional components in the objects (see Examples).
如果您不希望您的数据进行编辑,然后保存save是最好的,它的速度快,创建更小的文件,将节省的任何附加组件的对象(见例)。
用法----------Usage----------
read.TRAMPknowns(file.pat, auto.save=TRUE, overwrite=FALSE)
write.TRAMPknowns(x, file.pat=x$file.pat, warn=TRUE)
read.TRAMPsamples(file.pat)
write.TRAMPsamples(x, file.pat)
参数----------Arguments----------
参数:x
A TRAMPknowns or TRAMPsamples object.
ATRAMPknowns或TRAMPsamples对象。
参数:file.pat
Pattern, with the filename prefix: “info” and “data” objects will be read/written as <file.pat>_info.csv and <file.pat>_data.csv, respectively.
<file.pat>_info.csv和<file.pat>_data.csv,模式,文件名前缀:“信息”和“数据”对象将读/写分别。
参数:auto.save
Logical: Should TRAMPknowns object be automatically saved back to the loaded filename as it is modified (e.g. knowns added to the database). If this is TRUE, the original files will be backed up as <file.pat>_(info|data)_<YYYYMMDD>.csv, where <YYYYMMDD> is the ISO date.
逻辑:应该TRAMPknowns对象被自动保存加载的文件名,因为它被修改(例如,已知添加到数据库中)。如果这是TRUE,原始文件将被备份,<file.pat>_(info|data)_<YYYYMMDD>.csv,其中<YYYYMMDD>是ISO日期。
参数:overwrite
Should previous backup files be overwritten when creating new backups?
如果以前的备份文件被覆盖时,创建新的备份?
参数:warn
Should the function warn when no filename is given? (Because this function is called automatically when adding new knowns, and because TRAMPknowns objects need not contain a file.pat element, it may not be possible or neccesary to save).
如果没有给出文件名时发出警告的功能? (因为这个功能被称为自动添加新的已知时,,因为TRAMPknowns对象不必包含file.pat元素,它可能不可能或neccesary的保存)。
Details
详细信息----------Details----------
file.pat may contain a path. It is best to use forward slashes as directory separators (path/to/file), but on Windows (only), double backslashes will also work (path\\to\\file).
file.pat可能包含路径。最好的方法是使用正斜杠作为目录分隔符(path/to/file),但在Windows(只),双反斜杠也将正常工作(path\\to\\file)。
Paths may be either relative (e.g. path/to/file), or absolute (e.g. /path/to/file, or x:/path/to/file on Windows).
路径可以是相对路径(例如path/to/file),或绝对(例如/path/to/file或x:/path/to/file在Windows)。
参见----------See Also----------
load.abi, for semi-automatic loading of ABI output files.
load.abi,半自动装载的ABI输出文件。
save and load, for saving and loading of arbitrary R objects.
save和load,用于保存和加载的任意R对象。
实例----------Examples----------
## Not run: [#不运行:]
# Preferred way of saving/loading objects, if editing is not required:[首选的方法保存/加载的对象,如果不需要编辑:]
save(demo.knowns, file="my_knowns.Rdata")
# (possibly in a different session, but _after_ loading TRAMP)[(可能在不同的会话,但_after_加载TRAMP)]
load("my_knowns.Rdata") # -> creates 'demo.knowns' in global environment[ - >创建“demo.knowns在全球环境]
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|