除了默認分隔符不同,沒有其它區別!
請看官方文檔:
read.csv and read.csv2 are identical to read.table except for the
defaults. They are intended for reading ‘comma separated value’ files
(‘.csv’) or (read.csv2) the variant used in countries that use a comma
as decimal point and a semicolon as field separator. Similarly,
read.delim and read.delim2 are for reading delimited files, defaulting
to the TAB character for the delimiter. Notice that header = TRUE and
fill = TRUE in these variants, and that the comment character is
disabled.
翻譯:
read.csv和read.csv2與read.table相同,但默認值除外。
它們用於讀取“逗號分隔值”文件(’.csv’)或(read.csv2)在使用逗號作爲小數點和分號作爲字段分隔符的國家/地區中使用的變體。
類似地,read.delim和read.delim2用於讀取默認分隔符爲TAB的文件。 請注意,這些變體中的header =
TRUE和fill = TRUE,並且註釋字符已禁用。
《R語言實戰》:
讀取Excel文件,推薦先導出成.csv文件再用read.csv導入。如果要直接導入,可以用xlsx包。