-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
It would be reassuring to have the rownames of the $rollcall output be named by the rollcall vote IDs as identified in the rollcall object. I presume it is ordered the same way as the columns of the input matrix (?), but better if it's tracked.
This is done in the legislator output:
library(oc)
data(sen90)
# input data has vote IDs
head(colnames(sen90$votes))
#> [1] "Vote 1" "Vote 2" "Vote 3" "Vote 4" "Vote 5" "Vote 6"
# Run OC
sen90.1d <- oc(sen90, dims = 1, polarity = c(7))
# But output data has no rollcall IDs
head(sen90.1d$rollcall)
#> correctYea wrongYea wrongNay correctNay PRE normVector1D midpoints
#> [1,] 38 13 1 48 0.64102564 0 55.50
#> [2,] 47 1 13 38 0.64102564 0 55.50
#> [3,] 52 6 2 40 0.82608696 0 59.50
#> [4,] 50 22 4 6 0.07142857 0 14.75
#> [5,] 68 5 2 9 0.50000000 0 14.75
#> [6,] 2 0 15 75 0.11764706 0 3.50Created on 2024-01-10 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
No labels