The cols_unhide() method allows us to unhide one or more columns from appearing in the final output table. This may be important in cases where the user obtains a GT instance with hidden columns and there is motivation to reveal one or more of those.
Parameters
columns:SelectExpr
The columns to unhide in the output display table. Can either be a single column name or a series of column names provided in a list.
The GT object is returned. This is the same object that the method is called on so that we can facilitate method chaining.
Examples
For this example, we’ll use a portion of the countrypops dataset to create a simple table. We’ll hide the year column using cols_hide() and then unhide it with cols_unhide(), ensuring that the year column remains visible in the table.