readDataOT1(shotGroups)
readDataOT1()所属R语言包:shotGroups
Read data files exported by OnTarget PC v1.10
ONTARGET PC V1.10读取数据导出的文件
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Reads in data from files exported by OnTarget PC v1.10. Several files can be read with one call.
在ONTARGET PC V1.10导出的文件中的数据读取。一些文件可以读一个呼叫。
用法----------Usage----------
readDataOT1(fPath = getwd(), fNames, fPat, combine = FALSE)
参数----------Arguments----------
参数:fPath
a character string containing the path to the folder with the OnTarget PC output files. E.g., 'c:/folder/otFiles'.
一个字符串,包含路径的文件夹,的ONTARGET PC输出文件。例如,'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.delim. <br> <br> Output files need to be tab-delimited files from OnTarget PC v1.10: 'Tools -> Export Point Data'. Files need a trailing tab in each row, and need to contain exactly the following variable names in this order: Project Title, Group, Ammunition, Distance, Aim X, Aim Y, Center X, Center Y, Point X, Point Y. <br> <br> For reading in files exported from OnTarget PC 2.10 or OnTarget TDS v3.71, see readDataOT2. <br> For reading in other tab-delimited text files, see readDataMisc.
如果fNames,fPat被忽略。 <BR> <BR>如果没有fNames也不fPat,我们是在Windows下的互动模式,文件可以选择交互。参考此功能是基本的包装read.delim。参考参考输出文件需要是ONTARGET PC V1.10制表符分隔的文件:“工具” - >“导出”点数据。文件结尾需要一个选项卡中的每一行,并需要确切地包含以下变量名的顺序是:Project Title,Group,Ammunition,Distance,Aim X ,Aim Y,Center X,Center Y,Point X,Point Y。在导出的文件从在ONTARGET PC 2.10或ONTARGET TDS v3.71 <br> <br>对于阅读,看readDataOT2。 <br>对于在其他制表符分隔的文本文件阅读,请参阅readDataMisc。
值----------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.delim, regex, glob2rx, combineData, readDataOT2, readDataMisc
read.delim,regex,glob2rx,combineData,readDataOT2,readDataMisc
实例----------Examples----------
## Not run: [#不运行:]
# folder with OnTarget PC v1.10 output files[ONTARGET PC v1.10的输出文件的文件夹]
fPath <- 'c:/folder/otFiles'
fileNam <- c('pts01.txt', 'pts02.txt') # desired files in that folder[在该文件夹中所需的文件]
DFlist <- readDataOT1(path, fNames=fileNam)
## alternatively specify filename pattern for all files to be read in[#另外指定要读取的所有文件的文件名模式]
fPath <- 'c:/folder/otFiles' # folder with data files[与数据文件的文件夹]
fPat <- '^pts[[:digit:]]{2}\\.txt$' # filename pattern[文件名模式]
DFlist <- readDataOT1(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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|