
golosovRST is an R package for Golosov Relative Size Triangle (RST) classification and plotting.
It computes RST coordinates, classifies party-system observations into Golosov subtypes using polygon mapping, and produces publication-ready RST plots.
.validate_rst_input()plot_rst()rst_classify()rst_coords()install.packages("golosovRST")
.validate_rst_input(data)Validate input for Golosov RST functions.
plot_rst(data, label_col = NULL)Plot Golosov Relative Size Triangle.
Arguments
data: A data.frame containing numeric columns s1, s2, s3, representing the seat shares of the three largest parties in parliament after the election.label_col: Optional character scalar: name of a column used as point labels.Value
ggplot2 object.rst_classify(data, offset = 5e-16)Classify observations in Golosov subtypes using RST polygons.
Arguments
data: A data.frame containing numeric columns s1, s2, s3, representing the seat shares of the three largest parties in parliament after the election.offset: Small numeric offset used to avoid polygon-edge ambiguity.Value
data.frame with coordinates and golosov_subtype.rst_coords(data)Compute Golosov relative size coordinates.
Arguments
data: A data.frame containing numeric columns s1, s2, s3, representing the seat shares of the three largest parties in parliament after the election.Value
data.frame with original columns plus sr, x, and y.library(golosovRST)
mydata <- data.frame(
country = c("uk 2015", "ita 2013", "spa 2015"),
s1 = c(0.508, 0.4714, 0.3514),
s2 = c(0.357, 0.1730, 0.2571),
s3 = c(0.086, 0.1556, 0.1971)
)
plot_rst(mydata, label_col = "country")
cls <- rst_classify(mydata)
crd <- rst_coords(mydata)
cls
crd

rst_classify(mydata)
cls
country s1 s2 s3 sr golosov_subtype X Y
1 uk 2015 0.5080 0.3570 0.0860 0.0490 Two-Party Monovalent 0.7289048 0.2423698
2 ita 2013 0.4714 0.1730 0.1556 0.2000 Multiparty Monovalent 0.5555556 0.5296396
3 spa 2015 0.3514 0.2571 0.1971 0.1944 Multiparty Monovalent 0.8272261 0.7172957
rst_coords(mydata)
crd
country s1 s2 s3 sr x y
1 uk 2015 0.5080 0.3570 0.0860 0.0490 0.7289048 0.2423698
2 ita 2013 0.4714 0.1730 0.1556 0.2000 0.5555556 0.5296396
3 spa 2015 0.3514 0.2571 0.1971 0.1944 0.8272261 0.7172957