我有一个数据库。如何将所有列名称都添加到数组中?
我的代码是:
library(foreign)
library(memisc)
data <- read.spss("data.sav", use.value.labels = FALSE, max.value.labels = 100)
Columns <- summary(data)
Columns[1]
示例:
[1] "20582"
必需的输出:
SubsID
print(Columns):
Length Class Mode
SubsID 20582 -none- numeric
SubsID_RN 20582 -none- character
responseid 20582 -none- numeric
...