Generate column definitions for hyperlinked URLs
colDef_urlLink.Rd
The colDef_urlLink
function generates column definitions for hyperlinked URLs
in a Reactable table. It creates column definitions based on provided column names and
a text to display as the link.
Arguments
- cols
A character vector specifying the column names for which the hyperlink column definitions are to be generated.
- link_text
A character string specifying the text to be displayed as the link.
Examples
mtcars %>%
mutate(url_raw = "www.google.com",
url_names = rownames(.)) %>%
remove_rownames() %>%
reactable(
defaultColDef = colDef(footerStyle = list(fontWeight = "bold")),
columns = combined_named_lists(
colDef_urlLink(cols = "url_raw", link_text = "Example text to link")
)
)
#> Error in map(item_list, names): could not find function "map"