读入外部文件
2015-11-24 17:43
267 查看
Delimited files(符号分割文件)
*based on the read.table()functionread.table(file, header, sep = , quote = , dec = , row.names, col.names,as.is = , na.strings , colClasses , nrows =, skip = ,check.names = , fill = , strip.white = , blank.lines.skip = ,comment.char = , allowEscapes = , flush = , stringsAsFactors = ,encoding = )
sep 假定每个字段之间都有一个分隔符:例如有一个文件top.5.salsries.csv,内容如下:
name.last,name.first,team,position,salary
“Manning”,”Peyton”,”Colts”,”QB”,18700000
“Brady”,”Tom”,”Patriots”,”QB”,14626720
“Pepper”,”Julius”,”Panthers”,”DE”,14137500
“Palmer”,”Carson”,”Bengals”,”QB”,13980000
“Manning”,”Eli”,”Giants”,”QB”,12916666
上例中,文本字段都是有引号的,每个字段由逗号分割。假定该文件在当前目录下,读取该文件:
top.5.salaries <- read.table("top.5.salaries.csv", header=TRUE, sep=",", quote="\"")
相关文章推荐
- 微信公众平台开发 - 自定义菜单
- CI框架的部署
- 端口号被占(JVM_Bind)
- ImageNet Classification with Deep Convolutional Neural Networks阅读笔记
- 关于推送
- Onboard,迷人的引导页样式制作库
- ios9 -3dtouch 手势添加到app上
- Oracle常用函数整理
- org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1(XXX) refused
- HP iLo licenses
- ubuntu 安装部署rsh
- MaxScript 例子 渲染
- 用MATLAB进行SVM分类
- Android SDk Manager 目前可用的更新ip
- nm命令中符号类型详解
- 多媒体开发之h264的三种字节流格式---annexb 哥伦布/mp4 以及还有一种rtp传输流格式
- android ViewPager滑动事件讲解
- 五、JavaScript对象
- CGRectGetHeight, CGRectGetMinY,CGRectGetMaxY,CGRectGetMinX,CGRectGetMaxX,CGRectGetMidX,CGRectGetMidY
- IOS欢迎界面Launch Screen动态加载广告