全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
5725 13
2012-04-18
>mydata<-read.fwf("data.txt",widths=c(1,4,3))
警告信息:
In readLines(file, n = thisblock) : 读'data.txt'时最后一行未遂
The file data.txt exist in the directory which I set . I run this code , but error information appear. Who can tell me what's wrong with the code.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-4-18 10:49:37
The code comes from the book R for beginngers (Chinese Edition) .
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-4-18 11:04:16
把数据data.txt附上来看看。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-4-18 11:13:32
A1.501.2
A1.551.3
B1.601.4
B1.651.5
C1.701.6
C1.751.7
This is the data.txt.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-4-18 11:15:38
googlegood 发表于 2012-4-18 11:13
This is the data.txt.
我用的一切正常
> mydata<-read.fwf("data.txt",widths=c(1,4,3))
> mydata
  V1   V2  V3
1  A 1.50 1.2
2  A 1.55 1.3
3  B 1.60 1.4
4  B 1.65 1.5
5  C 1.70 1.6
6  C 1.75 1.7
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-4-18 11:27:08
qoiqpwqr 发表于 2012-4-18 11:15
我用的一切正常
> mydata mydata
  V1   V2  V3
I restart my R and try again , my R still tell me the error.
> mydata<-read.fwf("data.txt",widths=c(1,4,3))
警告信息:
In readLines(file, n = thisblock) : 读'data.txt'时最后一行未遂
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群