Printing a prcalc_index object.

Description

Printing a prcalc_index object.

Usage

## S3 method for class 'prcalc_index'
print(x, subset = NULL, hide_id = FALSE, use_gt = FALSE, digits = 3, ...)

Arguments

x a prcalc_index object.
subset a
hide_id a
use_gt a
digits the number of decimal places. Default is 3.
ignored.

Examples

library(PRcalc)

data(jp_upper_2019)

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

index(pr_obj)
            ID                         Index    Value
1       dhondt                       D’Hondt 1.116833
2       monroe                        Monroe 0.018918
3       maxdev    Maximum Absolute Deviation 0.010461
4     mm_ratio                 Max-Min ratio      Inf
5          rae                           Rae 0.004664
6           lh             Loosemore & Hanby 0.030315
7      grofman                       Grofman 0.011677
8     lijphart                      Lijphart 0.004069
9    gallagher                     Gallagher 0.014609
10 g_gallagher         Generalized Gallagher 0.014609
11       gatev                         Gatev 0.032939
12    ryabtsev                      Ryabtsev 0.023298
13      szalai                        Szalai 0.555712
14    w_szalai               Weighted Szalai 0.090661
15          ap          Aleskerov & Platonov 1.042141
16        gini                          Gini 0.036069
17    atkinson                      Atkinson 1.000000
18          sl                  Sainte-Laguë 0.018466
19          cs                 Cox & Shugart 1.033646
20      farina                        Farina 0.046282
21      ortona                        Ortona 0.046909
22          cd          Cosine Dissimilarity 0.000867
23          rr Lebeda’s RR (Mixture D’Hondt) 0.104611
24         arr                  Lebeda’s ARR 0.008047
25         srr                  Lebeda’s SRR 0.041482
26        wdrr                 Lebeda’s WDRR 0.055081
27          kl     Kullback-Leibler Surprise 0.016431
28          lr    Likelihood Ratio Statistic      Inf
29       chisq                   Chi Squared 0.004225
30   hellinger            Hellinger Distance 0.087758
31          ad              alpha-Divergence 0.009233
index(pr_obj) |>
  print(subset = c("lh", "gallagher", "rae", "dhondt", "ad"))
         ID             Index   Value
1    dhondt           D’Hondt 1.11683
2       rae               Rae 0.00466
3        lh Loosemore & Hanby 0.03032
4 gallagher         Gallagher 0.01461
5        ad  alpha-Divergence 0.00923