TimStats commited on
Commit
9dabf8b
·
verified ·
1 Parent(s): 33e14e0

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +15 -0
app.R CHANGED
@@ -329,7 +329,22 @@ server <- function(input, output, session) {
329
  core = list(fg_params = list(cex = 1.5)), # Increase text size
330
  colhead = list(fg_params = list(cex = 1.5)),
331
  rowhead = list(fg_params = list(cex = 2.5))))
 
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  # Download and process image
334
  if(input$league == "MLB"){
335
  y <- paste("https://midfield.mlbstatic.com/v1/people/","/mlb/300?circle=false",sep = id)
 
329
  core = list(fg_params = list(cex = 1.5)), # Increase text size
330
  colhead = list(fg_params = list(cex = 1.5)),
331
  rowhead = list(fg_params = list(cex = 2.5))))
332
+ table_plot$widths[[1]] <- unit(0, "cm")
333
 
334
+ # Find the text grobs in the first column
335
+ text_grobs <- which(sapply(table_plot$grobs, function(g) {
336
+ g$name == "core-fg-1" && inherits(g$children[[1]], "text")
337
+ }))
338
+
339
+ # Remove the numbers from these text grobs
340
+ for (i in text_grobs) {
341
+ text <- table_plot$grobs[[i]]$children[[1]]$label
342
+ table_plot$grobs[[i]]$children[[1]]$label <- sub("^\\d+\\s*", "", text)
343
+ }
344
+
345
+ # Draw the modified table
346
+ grid.newpage()
347
+ grid.draw(table_plot)
348
  # Download and process image
349
  if(input$league == "MLB"){
350
  y <- paste("https://midfield.mlbstatic.com/v1/people/","/mlb/300?circle=false",sep = id)