Superscript in gt table

HI, I have got this code using gt package:


SEATS<- data.frame(matrix(ncol = 4, nrow = 10))
colnames(SEATS) <-c("EPG","2004-2009","2009-2014","2014-2019")
SEATS[,1] <- c("European People's Party group (EPP)", 
                     "Progressive Alliance of Socialists and Democrats (S&D)",
                     "European Conservatives and Reformists (ECR)",
                     "Group of the Alliance of Liberals and Democrats for Europe (ALDE)",
                     "European United Left/Nordic Green Left (GUE/NGL)",
                     "The Greens/European Free Alliance (Greens/EFA)",
                     "Europe of Freedom and Direct Democracy (EFDD)",
                     "Europe of Nations and Freedom (ENF)",
                     "Union for Europe of the Nations (UEN)",
                     "Independence/Democracy (IND/DEM)")

SEATS[1,2:4] <- c(288,273,216)
SEATS[2,2:4] <- c(218,195,185)
SEATS[3,2:4] <- c(0,57,77)
SEATS[4,2:4] <- c(100,83,69)
SEATS[5,2:4] <- c(40,35,52)
SEATS[6,2:4] <- c(43,57,52)
SEATS[7,2:4] <- c(0,31,42)
SEATS[8,2:4] <- c(0,0,36)
SEATS[9,2:4] <- c(44,0,0)
SEATS[10,2:4] <- c(22,0,0)

gt(SEATS, rowname_col = EPG) 

I would like to name the columns as 6th EP, 7th EP, 8th EP with 'th' as a superscript, any advice?

Thank you

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.