在r中读取.data文件
我需要读取.data类型的数据文件(可以找到)。我以前从未见过或读过这样的文件,当我尝试读取.table(file=“ionosphere.data”)时,单个实例的所有属性都被分组在一起。如何正确读取此文件?您只需在在r中读取.data文件,r,dataset,R,Dataset,我需要读取.data类型的数据文件(可以找到)。我以前从未见过或读过这样的文件,当我尝试读取.table(file=“ionosphere.data”)时,单个实例的所有属性都被分组在一起。如何正确读取此文件?您只需在read.table中指定分隔符:read.table(“https://archive.ics.uci.edu/ml/machine-learning-databases/ionosphere/ionosphere.data“,sep=“,”您只需在read.table:read
read.table
中指定分隔符:read.table(“https://archive.ics.uci.edu/ml/machine-learning-databases/ionosphere/ionosphere.data“,sep=“,”
您只需在read.table
:read.table中指定分隔符即可("https://archive.ics.uci.edu/ml/machine-learning-databases/ionosphere/ionosphere.data“,sep=“,”
这是一个UTF-16文件,开头有一个字节顺序标记。除非指定正确的编码,否则read.table将失败。这在MacOS上适用。小数用逗号表示
read.table("ionosphere.data", fileEncoding="UTF-16", dec=",")
这是一个UTF-16文件,开头有一个字节顺序标记。除非指定正确的编码,否则read.table将失败。这在MacOS上适用。小数用逗号表示
read.table("ionosphere.data", fileEncoding="UTF-16", dec=",")
您可以下载文件并键入
x您可以下载文件并键入x