r语言 - 从word文件中检索数据



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

这是从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
)

最新更新