Create a styled table with gt
stm_gtable.Rd
stm_gtable()
converts the provided data to a tibble, replaces any
missing values with a dash ("-"), and generates a styled table using the
gt
package. It applies borders, alignment, and other custom styles
to the table's body and column labels.
Value
A `gt` table object with styling applied. The table will have missing values replaced with a dash ("-"), cell borders, and left alignment for character columns.
Details
The function performs the following operations:
Converts the input data into a tibble using
tibble::as_tibble()
.Replaces any missing values in the data with a dash ("-") using
tidyr::replace_na()
.Creates a table using the
gt::gt()
function.Applies cell border styles to the body and column labels of the table.
Left-aligns character columns and applies additional styling such as padding and bold column labels.