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      自民 17712373
2      公明  6536336
3      立憲  7917721
4      維新  4907844
5      共産  4483411
6      国民  3481078
7    れいわ  2280253
8      社民  1046012
9       N国   987885
10   安楽死   269052
11     幸福   202278
12 オリーブ   167897
13   労働者    80055

Result:
      Party Vote
1      自民   18
2      公明    7
3      立憲    8
4      維新    5
5      共産    5
6      国民    3
7    れいわ    2
8      社民    1
9       N国    1
10   安楽死    0
11     幸福    0
12 オリーブ    0
13   労働者    0

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

Magnitude: 50