Skip to content

grand_summary_rows errors on all NA columns #471

@smingerson

Description

@smingerson

latest from github (GithubSHA1: 883df9a)

My use case is an empty table showing what information will be displayed. The end user will enter info in a Shiny app and then the table will update. My workaround will be to populate the table with 0s. Edit: this also happens with 0. The error happened in the print method, when it is applying the functions to the columns.

library(gt)
grand_summary_rows(gt(data.frame(a = c(1,2), b = NA_real_)), columns = vars(b),
                   fns = list(max = ~max(.)))
#> Error: Column `b` must be length 1 (the number of rows), not 0

Created on 2020-01-17 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions