can add links within reactable to link to cross link language.
In this way can just have the english language table, and then the "en", "fr", etc in the language cell become individual links to the package dataset documentation pkgdown site for that language.
Not convinced the below code example will work - also see this stackoverflow answer
# Define the base URL of your pkgdown website
pkgdown_url <- "https://yourpkgwebsite.com/reference/"
# Create a function to generate links for each language
create_language_links <- function(dataset_name, languages) {
language_list <- strsplit(languages, ", ")[[1]]
# Create HTML anchor tags with links to dataset documentation
language_links <- sapply(language_list, function(lang) {
dataset_doc <- paste0(pkgdown_url, dataset_name, "_", lang, ".html")
paste0("<a href='", dataset_doc, "' target='_blank'>", lang, "</a>")
})
# Combine all the language links
paste(language_links, collapse = ", ")
}
# Add a column to dataset_info with the clickable language links
dataset_info$language_links <- mapply(create_language_links, dataset_info$dataset_name, dataset_info$languages)
# Render the reactable
reactable(
dataset_info,
columns = list(
dataset_name = colDef(name = "Dataset Name"),
language_links = colDef(name = "Languages", html = TRUE)
)
)
can add links within reactable to link to cross link language. In this way can just have the english language table, and then the "en", "fr", etc in the language cell become individual links to the package dataset documentation pkgdown site for that language.
Not convinced the below code example will work - also see this stackoverflow answer