1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
data(HouseVotes84, package = "mlbench")
HouseVotes84_sub = na.omit(HouseVotes84)
str(HouseVotes84_sub)
# 'data.frame': 232 obs. of 17 variables:
# $ Class: Factor w/ 2 levels "democrat","republican": 1 2 1 1 1 1 1 2 1 2 ...
# $ V1 : Factor w/ 2 levels "n","y": 1 1 2 2 2 2 2 2 2 1 ...
# $ V2 : Factor w/ 2 levels "n","y": 2 2 2 2 1 1 2 1 2 2 ...
# $ V3 : Factor w/ 2 levels "n","y": 2 1 2 2 2 2 2 1 2 1 ...
# $ V4 : Factor w/ 2 levels "n","y": 1 2 1 1 1 1 1 2 1 2 ...
# $ V5 : Factor w/ 2 levels "n","y": 2 2 1 1 1 1 1 2 1 2 ...
# $ V6 : Factor w/ 2 levels "n","y": 2 2 1 1 1 1 1 1 1 2 ...
# $ V7 : Factor w/ 2 levels "n","y": 1 1 2 2 2 2 2 2 2 1 ...
# $ V8 : Factor w/ 2 levels "n","y": 1 1 2 2 2 2 2 2 2 1 ...
# $ V9 : Factor w/ 2 levels "n","y": 1 1 2 2 2 2 2 2 2 1 ...
# $ V10 : Factor w/ 2 levels "n","y": 1 1 1 1 2 1 1 1 1 1 ...
# $ V11 : Factor w/ 2 levels "n","y": 1 1 2 1 1 2 2 1 2 1 ...
# $ V12 : Factor w/ 2 levels "n","y": 1 2 1 1 1 1 1 2 1 2 ...
# $ V13 : Factor w/ 2 levels "n","y": 2 2 1 1 1 1 1 2 1 2 ...
# $ V14 : Factor w/ 2 levels "n","y": 2 2 1 1 1 1 1 2 1 2 ...
# $ V15 : Factor w/ 2 levels "n","y": 2 1 2 2 2 2 2 1 2 1 ...
# $ V16 : Factor w/ 2 levels "n","y": 2 2 2 2 2 2 2 2 2 1 ...
# - attr(*, "na.action")= 'omit' Named int [1:203] 1 2 3 4 5 7 8 10 11 12 ...
# ..- attr(*, "names")= chr [1:203] "1" "2" "3" "4" ...
#第一列:众议员的派别
#第2到17列:16次投票的表决情况
|