開始使用免費開始

使用 read.table 讀取多變量資料

從檔案或外部 URL 讀取多變量資料,通常可依資料來源型別使用 read.table()read.csv() 指令。在本練習中,你要從 UCI 機器學習網站讀取 wine 資料集。資料集的完整說明可在這裡找到。

想了解更多在 R 中讀取資料的方法,你可以參考 DataCamp 的課程:Introduction to Importing Data in RIntermediate Importing Data in R。完成本練習後,wine 資料集會為你預先載入。

本練習屬於課程

R 的多變量機率分配

檢視課程

練習說明

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Read in the wine dataset
wine <- read.table("___", sep = ",")

# Print the first four entries
head(___)

# Find the dimensions of the data
dim(___)

# Check the names of the wine dataset 
___
編輯並執行程式碼