Skip to content

"fixed" gt tables cause error when specifying widths in plot_layout() #461

@mccarthy-m-g

Description

@mccarthy-m-g

Here's a reprex:

library(patchwork) # version 1.3.2
library(gt) # version 1.1.0

# Works:
wrap_table(gt(head(mtcars))) +
  plot_spacer() + 
  plot_layout(widths = c(2, 1))

# Fails:
wrap_table(gt(head(mtcars)), space = "fixed") +
  plot_spacer() + 
  plot_layout(widths = c(2, 1))
#> Error in `class<-`(unlist(lapply(x, as.unit), recursive = FALSE), c("unit",  : 
#> attempt to set an attribute on NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions