从word文件中检索数据

时间:2017-08-16 15:33:54

标签: r import

这个机器学习数据库已被分成两个文件,German.data用于所有值,另一个是描述文件,这里是链接。 https://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/?C=D;O=A,我该怎么办?从word文件中检索相关信息到R? 使其成为一个列表,其中包含所有属性作为其元素,并在每个元素中包含其因素。

1 个答案:

答案 0 :(得分: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
 )