Seacreature2=scan(file = "E:\Homework of R languange\data and solutions\BookData\ISIT.txt",skip=1,dec=".")
结果:
num[1:3495] 517 28.7 1 ....
用scan读取数据成矩阵,可用语句:Seacreature2 <- matrix(scan("E:\Homework of R languange\data and solutions\BookData\ISIT.txt", what="c", dec='
.', skip=1),ncol=4, byrow=TRUE) 。ncol改成实际列数
参考: