R语言read.table函数

更新时间:2023-07-20 11:30:13 阅读: 评论:0

R语⾔read.table函数
read.table(file, header = FALSE, p = "", quote = "\"'",
dec = ".", numerals = c("allow.loss", "warn.loss", "no.loss"),
row.names, col.names, as.is = !stringsAsFactors,
na.strings = "NA", colClass = NA, nrows = -1,
skip = 0, check.names = TRUE, fill = !blank.lines.skip,
strip.white = FALSE, blank.lines.skip = TRUE,
恍然大悟的反义词comment.char = "#",
allowEscapes = FALSE, flush = FALSE,
stringsAsFactors = default.stringsAsFactors(),
fileEncoding = "", encoding = "unknown", text, skipNul = FALSE)
匍匐拳
file ⽂件名,在windows系统下可为“dir\\”,在linux系统下为“”
heade
r header设置为TRUE,表⽰第⼀⾏的内容是每⼀列的名字
p分隔符,默认p = ""(空格)
quote quote只对被当做character的列有效
dec the character ud in the file for decimal points.
numer
als string indicating how to convert numbers who conversion to double precision would lo accuracy
row.n
零上10度穿什么衣服ames⾏名的向量
col.na
mes列名的向量
as.is the default behavior of
read.table
is to convert character variables (which are not converted to logical, numeric or complex) to factors. The variable
as.is
中毒症状controls the conversion of columns not otherwi specified by
colClass
. Its value is either a vector of logicals (values are recycled if necessary), or a vector of numeric or character indices which specify which columns should not be converted to factors.
Note: to suppress all conversions including tho of numeric columns, t
colClass = "character"
秦朝服饰
.
Note that
as.is
is specified per column (not per variable) and so includes the column of row names (if any) and any
is specified per column (not per variable) and so includes the column of row names (if any) and any columns to be skipped.
na.stri ngs a character vector of strings which are to be interpreted as
values. Blank fields are also considered to be missing values in logical, integer, numeric and complex fields. Note that the test happens after white space is stripped from the input, so
na.strings
values may need their own white space stripped in advance.
colCla
ss表⽰读出的列的类型("character"、"numeric"、"Date"等)
nrows正整数,表⽰读⼊的最⼤⾏数
skip integer: the number of lines of the data file to skip before beginning to read data.
check. name s logical. If
TRUE
then the names of the variables in the data frame are checked to ensure that they are syntactically valid variable names. If necessary they are adjusted (by
) so that they are, and also to ensure that there are no duplicates.
fill logical. If
TRUE
then in ca the rows have unequal length, blank fields are implicitly added. See ‘Details’.
strip.w hite logical. Ud only when
p
has been specified, and allows the stripping of leading and trailing white space from unquoted
character
fields (
numeric
fields are always stripped). See
for further details (including the exact meaning of ‘white space’), remembering that the columns may include the row names.
blank.l ines.s kip logical: if
TRUE
blank lines in the input are ignored.
comm ent.ch ar character: a character vector of length one containing a single character or an empty string. U ""
to turn off the interpretation of comments altogether.
allow Escap es logical. Should C-style escapes such as \n be procesd or read verbatim (the default)? Note that if not within quotes the could be interpreted as a delimiter (but not as a comment character). For more details e
.
flush logical: if TRUE
参知政事
,
flush ,
scan
will flush to the end of the line after reading the last of the fields requested. This allows putting comments after the last field.
string sAsFa ctors logical: should character vectors be converted to factors? Note that this is overridden by as.is
and
colClass
, both of which allow finer control.
fileEn codin g character string: if non-empty declares the encoding ud on a file (not a connection) so the character data can be re-encoded. See the ‘Encoding’ ction of the help for
, the ‘R Data Import/Export Manual’ and ‘Note’.
encod ing encoding to be assumed for input strings. It is ud to mark character strings as known to be in Latin-1 or UTF-8 (e1到12月的英语
): it is not ud to re-encode the input, but allows R to handle encoded strings in their native encoding (if one of tho two). See ‘Value’ and ‘Note’.
text character string: if
file
is not supplied and this is, then data are read from the value of
text
via a text connection. Notice that a literal string can be ud to include (small) data ts within R code.
高考议论文题目skipN
ul logical: should nuls be skipped?

本文发布于:2023-07-20 11:30:13,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1088994.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:高考   系统   默认   向量   读出
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图