speedR.importany(speedR)
speedR.importany()所属R语言包:speedR
Data Import Without Using GUI
数据导入不使用GUI
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The speedR generates in interactive mode for every import R code. This code can be reused later without starting the GUI.
转速r产生的互动模式,每进口R代码。此代码可重复使用后不启动GUI。
用法----------Usage----------
speedR.importany(file=NULL,rowstart=NULL,rowend=NULL,colstart=NULL,colend=NULL,
hasRowNames = FALSE, rowNamesColumnIndex = NULL,hasColumnNames = FALSE,
columnNamesRowIndex = NULL, separator = NULL, quote = NULL,colClasses = NULL,maxmemory = NULL, ...)
参数----------Arguments----------
参数:file
the name of the file which the data are to be read from. Each row of the table appears as one line of the file. If it does not contain an absolute path, the file name is relative to the current working directory
该数据要被读取的文件的名称。表中的每一行显示的文件作为一行。如果它不包含一个绝对路径,文件名是相对于当前的工作目录
参数:rowstart
the index of line of the data file to start to read data.
行中的数据文件的索引,开始读取数据。
参数:rowend
the index of the last line to read.
读取的最后一行的索引。
参数:colstart
the index of the first column in the range
的范围中的第一列的索引
参数:colend
the index of the last column in the range
的范围内的最后一列中的索引
参数:hasRowNames
a logical value indicating wether the data.frame has a row names column
一个逻辑值,表示天气的数据框有一排名称列
参数:rowNamesColumnIndex
the index of the column containing the row names. Has an effect only if the hasRowNames is TRUE
含有的行的名称的列的索引。仅当hasRowNames为TRUE,则有一个效果
参数:hasColumnNames
a logical value indicating whether the data.frame object has column names
一逻辑值,该值指示数据框对象是否有列名
参数:columnNamesRowIndex
the index of the row containing the column names. Has an effect only if the hasColumnNames is TRUE
行包含列名的索引。仅当hasColumnNames为TRUE,则有一个效果
参数:separator
the field separator character.
字段分隔符。
参数:quote
the set of quoting characters.
的引号字符集。
参数:colClasses
A vector of classes to be assumed for the columns. Possible classes are numeric,character,factor,Date[=format],POSIXct[=format]. The Date and POSIXct formats can be added but optional. I.e. “Date=%d.%m.%Y" or &ldquo OSIXct=%Y-%m-%d %H:%M".
一个假设的列向量类的。可能的级别是数字,字符,因素,日期[格式],POSIXct [格式]。的日期和POSIXct的格式,可以添加,但可选的。即“日期=%d个。%M%Y”或“POSIXct =%Y-%M-%D%H:%M”。
参数:maxmemory
the maximum allocatable memory in Mb. If speedR is already once started, calling speedR with a different value will have no effect. To change the memory, R must be restarted and speedR has to be called with the new value.
分配的最大内存(MB)。如果转速r一旦启动,调用转速r具有不同的值不会有任何效果。要更改的内存,R必须重新启动和,转速r被称为新的价值。
参数:...
Other optional parameters sent to speedR.init like debugging and log level.
其他可选参数发送到speedR.init的调试和log级别等。
Details
详细信息----------Details----------
speedR depends on rJava and iplots packages. To install these packages please call install.packages(c("rJava","iplots")). In case of an "OutOfMemoryError", please increase the memory by setting the maxmemory parameter to a higher value. Note that R must be restarted. Following examples can be used as an indicator for how much the speedR can approximately consume memory:
转速r依赖于rJava和iplots包。要安装这些软件包,请致电install.packages(C(“rJava”中,“iplots”))。在“OutOfMemoryError异常”的情况下,请增加内存的maxmemory参数设置为更高的值。注意是R必须重新启动。下面的实施例可以使用多少转速r可以约消耗内存作为指示剂:
512 Mb : 10 columns, 800000 rows 1024 Mb: 20 columns, 800000 rows or 10 columns 1600000 rows
512 MB:10个栏目,80万行1024 MB:20列,80万行,10列1600000行
Note that memory consume depends not only on the columns and rows number, but it depends on the content of each cell too (i.e. char count).
需要注意的是内存消耗,不仅取决于行和列的数量,但它依赖于每个单元(即字符数)的内容。
实例----------Examples----------
## Not run: [#不运行:]
temp <- speedR.importany(file = "C:/decodersizes.txt",separator = "\t")
temp <- speedR.importany(file = "C:/decodersizes.txt",separator = ",",quote = "'")
temp <- speedR.importany(file = "C:/decodersizes.txt",separator = "\t",quote = "\"",rowstart = 3,rowend = 18313,colstart = 3,colend = 23,hasRowNames = TRUE,rowNamesColumnIndex = 2,hasColumnNames = TRUE,columnNamesRowIndex = 2)
temp <- speedR.importany(file = "F:/date.txt",colClasses=c("numeric","factor","Date=
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|