Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R编程-读取表格_R_Read.table - Fatal编程技术网

R编程-读取表格

R编程-读取表格,r,read.table,R,Read.table,当我想从R中的txt文件中读取表时,我遇到了一个问题。 当我这样做的时候 dat <- read.table("~/data/data.txt", quote="\""), 谢谢你的帮助 如果要重命名列,只需在名称向量之前添加col.names= 因此,您有类似于: dat <- read.table("~/data/data.txt", quote="\"", col.names=c("com", "Type", "blabla", "bl

当我想从R中的txt文件中读取表时,我遇到了一个问题。 当我这样做的时候

dat <- read.table("~/data/data.txt", quote="\""), 

谢谢你的帮助

如果要重命名列,只需在名称向量之前添加
col.names=

因此,您有类似于:

dat <- read.table("~/data/data.txt", quote="\"", 
                  col.names=c("com", "Type", "blabla", "blabla"), header=TRUE). 

dat如果要重命名列,只需在名称向量之前添加
col.names=

因此,您有类似于:

dat <- read.table("~/data/data.txt", quote="\"", 
                  col.names=c("com", "Type", "blabla", "blabla"), header=TRUE). 

dat如果要重命名列,只需在名称向量之前添加
col.names=

因此,您有类似于:

dat <- read.table("~/data/data.txt", quote="\"", 
                  col.names=c("com", "Type", "blabla", "blabla"), header=TRUE). 

dat如果要重命名列,只需在名称向量之前添加
col.names=

因此,您有类似于:

dat <- read.table("~/data/data.txt", quote="\"", 
                  col.names=c("com", "Type", "blabla", "blabla"), header=TRUE). 

dat将列名传递给
sep
参数。除非命名参数,否则需要按顺序传递它们。请参阅
?read.table
。尝试
read.table(“~/data/data.txt”,quote=“\”,col.names=c(“com”,“Type”,“blabla”,“blablabla”),header=TRUE)
您正在将列名传递给
sep
参数。除非您命名参数,否则您需要按顺序传递它们。请参阅
read.table
。尝试
read.table(“~/data/data.txt”,quote=“\”,col.names=c(“com”,“Type”,“blabla”,“blabla”),header=TRUE)
您正在将列名传递给
sep
参数。除非您命名参数,否则您需要按顺序传递它们。请参阅
?read.table
。尝试
read.table(~/data/data.txt),quote=“\”,col.names=c(“com”,“Type”,“blablablabla”,“blablabla”),header=TRUE)
您正在将列名传递给
sep
参数。除非命名参数,否则需要按顺序传递它们。请参阅
?read.table
。尝试
read.table(“~/data/data.txt”,quote=“\”,col.names=c(“com”,“Type”,“blabla”,“blabla”),header=TRUE)