2017-08-16 6 views
0

機械学習用のこのデータベースは2つのファイルに分かれています。German.dataはすべての値用で、もう1つは説明ファイルです。ここにはリンクがあります。 https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/?C=D;O=A、どのように単語ファイルからRに関連情報を取得できますか? すべての属性をその要素として、各要素内にその要素を持つリストにします。ワードファイルからデータを取得する

答えて

0

これはGitHubから引かれる:

url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data" 
col.names <- c(
'Status of existing checking account', 'Duration in month', 'Credit history' 
, 'Purpose', 'Credit amount', 'Savings account/bonds' 
, 'Employment years', 'Installment rate in percentage of disposable income' 
, 'Personal status and sex', 'Other debtors/guarantors', 'Present residence since' 
, 'Property', 'Age in years', 'Other installment plans', 'Housing', 'Number of  existing credits at this bank' 
, 'Job', 'Number of people being liable to provide maintenance for', 'Telephone',   'Foreign worker', 'Status' 
) 

data <- read.csv(
url 
, header=FALSE 
, sep=' ' 
, col.names=col.names 
) 
関連する問題