read.table(file,options)
Tables | Are | Cool |
---|---|---|
col 3 is | right-aligned | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
options | 描述 |
---|---|
header | 文件第一行是否表明了变量名的逻辑值 |
sep | 文件中分开数据值的分隔符,默认” “,换行符为“\t” |
row.names | 用于指定行标记符的可选参数 |
col.names | 当header=False时,用于指定变量名 |
na.strings | 用于表示缺失值的字符向量,可将table中某些特定的字符转为NA |
colClasses | 指定某个或者全部列的类 |
skip | 跳过文件的前多少行读取数据 |
stringsAsFactors | 字符向量是否需要转化为因子,默认是TRUE |