美文网首页生信
Error in read.table(file = file,

Error in read.table(file = file,

作者: 超级可爱的懂事长鸭 | 来源:发表于2021-04-13 10:50 被阅读0次

读取CSV文件遇到报错

Error in read.table(file = file, header = header, sep = sep, quote = quote, :
列的数目比列的名字要多

>clinical=read.csv('survival.csv')
Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  列的数目比列的名字要多

解决办法1:

用rio包读取

> library(rio)
The following rio suggested packages are not installed: ‘arrow’, ‘feather’, ‘fst’, ‘hexView’, ‘pzfx’, ‘readODS’, ‘rmatio’
Use 'install_formats()' to install them
Warning message:
程辑包‘rio’是用R版本4.0.4 来建造的 
> clinical=import('survival.csv')

解决办法2:

把CVS另存为下面的格式之后再读取


另存为.png

相关文章

网友评论

    本文标题:Error in read.table(file = file,

    本文链接:https://www.haomeiwen.com/subject/gemqlltx.html