Printing a prcalc object.

Description

Printing a prcalc object.

Usage

## S3 method for class 'prcalc'
print(
  x,
  prop = FALSE,
  show_total = TRUE,
  use_gt = FALSE,
  digits = 3,
  head = Inf,
  ...
)

Arguments

x a prcalc object.
prop If TRUE, voteshare and seatshare are displayed. Default is FALSE.
show_total If TRUE, total vote (share) and seat (share) are displayed on the last column. Default is TRUE.
use_gt Use gt package? Default is FALSE.
digits the number of decimal places. Default is 3.
head For example, if head = 6, only six rows are displayed. Default is Inf (entire rows).
ignored.

See Also

summary.prcalc

Examples

library("PRcalc")

data(jp_upper_2019)
jp2019 <- prcalc(jp_upper_2019, m = 50, method = "dt")

print(jp2019)
Raw:
       Party     Vote
1      Jimin 17712373
2      Komei  6536336
3   Ritsumin  7917721
4      Ishin  4907844
5     Kyosan  4483411
6    Kokumin  3481078
7      Reiwa  2280253
8     Shamin  1046012
9        NHK   987885
10 Anrakushi   269052
11    Kofuku   202278
12     Olive   167897
13   Rodosha    80055

Result:
       Party Vote
1      Jimin   18
2      Komei    7
3   Ritsumin    8
4      Ishin    5
5     Kyosan    5
6    Kokumin    3
7      Reiwa    2
8     Shamin    1
9        NHK    1
10 Anrakushi    0
11    Kofuku    0
12     Olive    0
13   Rodosha    0

Parameters:
  Allocation method: D'Hondt (Jefferson) method 
  Extra parameter: 
  Threshold: 0 

Magnitude: 50