我正在使用该haven
库将.sav
(SPSS)文件读入 R。
一些值被读取为labelled
vector
.
这是一个例子:
> str(df$instructional_practice)
Class 'labelled' atomic [1:4136] 2 2 6 6 8 8 NaN NaN 17 1 ...
..- attr(*, "label")= chr "intructional practice teacher is using when signaled"
..- attr(*, "format.spss")= chr "F8.2"
..- attr(*, "labels")= Named num [1:18] 1 2 3 4 5 6 7 8 9 10 ...
.. ..- attr(*, "names")= chr [1:18] "1 Lecture" "2 Seatwk-Ind" "3 Review-Ind" "4 Seatwk-Grp" ...
如何vector
获得标签名称的值?