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

R语言 shotGroups包 readDataMisc()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 01:59:02 | 显示全部楼层 |阅读模式
readDataMisc(shotGroups)
readDataMisc()所属R语言包:shotGroups

                                        Read data from text files
                                         从文本文件中读取数据

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

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

Reads data from text files that have a similar structure to OnTarget PC/TDS output files. Several files can be read with one call.
具有相似的结构,以的ONTARGET PC / TDS输出文件的文本文件中读取数据。一些文件可以读一个呼叫。


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


readDataMisc(fPath = getwd(), fNames, fPat, combine = FALSE)



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

参数:fPath
a character string containing the path to the folder with the data files, e.g. 'c:/folder/otFiles'.
一个字符串包含的数据文件的文件夹的路径,例如'c:/folder/otFiles'。


参数:fNames
a character vector containing the file names of the files that should be read in.
字符向量包含文件名的文件被读入。


参数:fPat
a character string containing the regular-expression that describes all names of files that should be read in. E.g., '^points[[:digit:]]{2}\\.txt$' for filenames 'points**.txt', where ** are 2 digits. See regex.
一个字符串,其中包含的正则表达式来描述所有的文件名应该被读入。例如,'^points[[:digit:]]{2}\\.txt$'的文件名'points**.txt',其中**2位。见regex。


参数:combine
a logical value indicating whether the data should be combined into one big data frame with combineData.
一个逻辑值,该值指示是否应该合并为一个大的数据框combineData的数据。


Details

详细信息----------Details----------

If fNames is provided, fPat is ignored. <br> <br> If neither fNames nor fPat is provided, and we are in interactive mode under Windows, files can be chosen interactively. <br> <br> This function is basically a wrapper for read.table. <br> <br> The files need to be whitespace-delimited, have a header with the variable names. They need to contain at least the variable Group if combineData should be later used to combine them into one big data frame. In order to be later used by functions analyzeGroup or compareGroups, the following variables need to be present as well: Distance, Aim.X, Aim.Y, Point.X, Point.Y. Additional variable names must not contain spaces. There can only be exactly as many variable names as there are non-empty data-columns. <br> <br> For reading in files exported from OnTarget PC 1.10, see readDataOT1. <br> For reading in files exported from OnTarget PC 2.10 or OnTarget TDS v3.71, see readDataOT2.
如果fNames,fPat被忽略。 <BR> <BR>如果没有fNames也不fPat,我们是在Windows下的互动模式,文件可以选择交互。参考此功能是基本的包装read.table。参考参考文件需要空格分隔,有一个标题和变量名。他们必须包含至少变量Group如果combineData应该在以后将它们组合成一个大的数据框。为了在以后的使用功能analyzeGroup或compareGroups,下面的变量需要以及Distance,Aim.X,Aim.Y,Point.X,Point.Y。额外变量名称不能包含空格。只能有一样多的变量名有非空数据列。 <br> <br>对于从ONTARGET PC 1.10导出的文件中阅读,请参阅readDataOT1。 <br>对于阅读中导出的文件从在ONTARGET PC 2.10或ONTARGET TDS v3.71,请参阅readDataOT2。


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

With combine=FALSE: a list of data frames, each from one file that was read in. This list can then be combined into one big data frame by combineData.
随着combine=FALSE:一个列表的数据框从一个文件读入此列表可以被组合成一个大的数据框由combineData。


参数:file1
data frame containing data from the first file
从第一个文件的数据框中包含的数据


参数:file2
data frame containing data from the second file
数据框包含的数据,从第二个文件


参数:...
more data frames
更多的数据框

With combine=TRUE: a combined data frame from combineData.
随着combine=TRUE:合并后的数据框从combineData。


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

read.table, regex, glob2rx, combineData, readDataOT1, readDataOT2
read.table,regex,glob2rx,combineData,readDataOT1,readDataOT2


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


## Not run: [#不运行:]
fPath   &lt;- 'c:/folder/otFiles'           # folder with data files[与数据文件的文件夹]
fileNam &lt;- c('pts01.txt', 'pts02.txt')   # desired files in that folder[在该文件夹中所需的文件]
DFlist  <- readDataMisc(path, fNames=fileNam)

## alternatively specify filename pattern for all files to be read in[#另外指定要读取的所有文件的文件名模式]
fPath  &lt;- 'c:/folder/otFiles'            # folder with data files[与数据文件的文件夹]
fPat   &lt;- '^pts[[:digit:]]{2}\\.txt$'  # filename pattern[文件名模式]
DFlist <- readDataMisc(path, fPat=pattern)

## End(Not run)[#(不执行)]

## result should look like this[#结果应该是这样的]
data(DFlistInch)

## overview over list[#的概述列表]
sapply(DFlistInch, dim)                  # number of obs and vars[OB和瓦尔]
str(DFlistInch)                          # variables in each data frame[每个数据框中的变量]
lapply(DFlistInch, head)                 # first rows in each data frame[每个数据框中的第一行]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-22 06:57 , Processed in 0.021202 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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