R不读取我的数据的所有行(R not reading all rows of my data)

编程入门 行业动态 更新时间:2024-10-27 17:09:41
R不读取我的数据的所有行(R not reading all rows of my data)

这是我的代码:

df <- read.table(file.choose(), sep = "\t", skip = 2, fill = T)

这里是在Excel中的文件: https : //ufile.io/q1xvg ,这里是在txt文件中,我特别使用导入(excel保存为txt): https : //ufile.io/8vnu6

数据有超过3000行,但RStudio只能导入1483 obs. of 24 variables 这里可以看到1483 obs. of 24 variables https://i.imgur.com/nNJjy5E.png

Here is my code:

df <- read.table(file.choose(), sep = "\t", skip = 2, fill = T)

Here is the file that in excel: https://ufile.io/q1xvg and here it is in txt file that I use specifically import (excel saved as txt): https://ufile.io/8vnu6

The data has over 3000 rows but RStudio only imports 1483 obs. of 24 variables as seen here https://i.imgur.com/nNJjy5E.png

最满意答案

尝试使用read.delim :

df <- read.delim("2016-txt.tsv", sep = "\t", skip = 2); dim(df); #[1] 3312 24

Try with read.delim:

df <- read.delim("2016-txt.tsv", sep = "\t", skip = 2); dim(df); #[1] 3312 24

更多推荐

本文发布于:2023-07-04 11:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1023640.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据   reading   data   rows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!