diff --git a/.Rhistory b/.Rhistory index f08c135..061d3ae 100644 --- a/.Rhistory +++ b/.Rhistory @@ -293,3 +293,102 @@ column_labels.font.size = "16px" cols_align(align="center", columns=c(Platinum, Silver)) %>% opt_horizontal_padding(scale = 3) %>% opt_vertical_padding(scale = 2) +# Sample data frame with HTML links +df <- data.frame( +Title = c( +"[Evaluate Performance using the Capital Asset Pricing Model](https://rconsortium.netlify.app/webinars/tidy-finance-webinar-series#evaluate-performance-using-the-capital-asset-pricing-model)", +"[Shiny in Production 2024](https://shiny-in-production.jumpingrivers.com/)", +"[2024 Government & Public Sector R Conference](https://www.rstats.ai/gov)", +"[Analyze Companies using Financial Ratios](https://rconsortium.netlify.app/webinars/tidy-finance-webinar-series#analyze-companies-using-financial-ratios)", +"[LatinR 2024](https://latinr.org/en/)", +"[Value Companies using Discounted Cash Flow Analysis](https://rconsortium.netlify.app/webinars/tidy-finance-webinar-series#value-companies-using-discounted-cash-flow-analysis)" +), +dates = c("Oct 9, 2024", "Oct 9-10, 2024", +"Oct 29-30, 2024", "Nov 6, 2024", "Nov 18-22, 2024", "Dec 4, 2024"), +location = c("Virtual", "Newcastle upon Tyne, UK", "Washington D.C., USA", "Virtual", "Virtual", "Virtual"), +icon = c("Webinar", "Conference", "Conference","Webinar", "Conference", "Webinar"), +Type = c("Webinar", "Conference", "Conference","Webinar", "Conference", "Webinar"), +stringsAsFactors = FALSE +) +df <- df |> +dplyr::filter(icon %in% c("Conference", "Webinar")) |> +dplyr::mutate( +icon = ifelse(icon == "Webinar", "chalkboard-user", "handshake") +) +# Load necessary libraries +library(gt) +# Create a gt table and use fmt_markdown() to render HTML links +gt_table <- gt(df) %>% +fmt_icon(columns = icon) %>% +cols_label( +Title = "Title", +dates = "Dates", +location = "Location", +icon = "Type", +) %>% +tab_options( +heading.background.color = "lightblue", +column_labels.background.color = "lightblue", +column_labels.font.weight = "bold", +table.font.size = "14px", +column_labels.font.size = "16px" +) %>% +opt_horizontal_padding(scale = 3) %>% +opt_vertical_padding(scale = 2) %>% +# +cols_merge(columns = c(Type, icon), +pattern="{2} {1}") %>% +# Render the 'Link' column as HTML using fmt_markdown() +fmt_markdown(columns = c(Title)) +# Print the gt table +gt_table +# Sample data frame with HTML links +df <- data.frame( +Title = c( +"[Evaluate Performance using the Capital Asset Pricing Model](https://rconsortium.netlify.app/webinars/tidy-finance-webinar-series#evaluate-performance-using-the-capital-asset-pricing-model)", +"[Shiny in Production 2024](https://shiny-in-production.jumpingrivers.com/)", +"[2024 Government & Public Sector R Conference](https://www.rstats.ai/gov)", +"[R/Pharma 2024](https://rinpharma.com/)", +"[Analyze Companies using Financial Ratios](https://rconsortium.netlify.app/webinars/tidy-finance-webinar-series#analyze-companies-using-financial-ratios)", +"[LatinR 2024](https://latinr.org/en/)", +"[Value Companies using Discounted Cash Flow Analysis](https://rconsortium.netlify.app/webinars/tidy-finance-webinar-series#value-companies-using-discounted-cash-flow-analysis)" +), +dates = c("Oct 9, 2024", "Oct 9-10, 2024", +"Oct 29-30, 2024", "Oct 29-31, 2024", "Nov 6, 2024", "Nov 18-22, 2024", "Dec 4, 2024"), +location = c("Virtual", "Newcastle upon Tyne, UK", "Washington D.C., USA", "Virtual", "Virtual", "Virtual", "Virtual"), +icon = c("Webinar", "Conference", "Conference", "Conference", "Webinar", "Conference", "Webinar"), +Type = c("Webinar", "Conference", "Conference", "Conference", "Webinar", "Conference", "Webinar"), +stringsAsFactors = FALSE +) +df <- df |> +dplyr::filter(icon %in% c("Conference", "Webinar")) |> +dplyr::mutate( +icon = ifelse(icon == "Webinar", "chalkboard-user", "handshake") +) +# Load necessary libraries +library(gt) +# Create a gt table and use fmt_markdown() to render HTML links +gt_table <- gt(df) %>% +fmt_icon(columns = icon) %>% +cols_label( +Title = "Title", +dates = "Dates", +location = "Location", +icon = "Type", +) %>% +tab_options( +heading.background.color = "lightblue", +column_labels.background.color = "lightblue", +column_labels.font.weight = "bold", +table.font.size = "14px", +column_labels.font.size = "16px" +) %>% +opt_horizontal_padding(scale = 3) %>% +opt_vertical_padding(scale = 2) %>% +# +cols_merge(columns = c(Type, icon), +pattern="{2} {1}") %>% +# Render the 'Link' column as HTML using fmt_markdown() +fmt_markdown(columns = c(Title)) +# Print the gt table +gt_table diff --git a/blog/index.qmd b/blog/index.qmd index c252edd..af1d044 100644 --- a/blog/index.qmd +++ b/blog/index.qmd @@ -10,5 +10,5 @@ page-layout: full [Want to contribute to the R Consortium blog? Please review our Blog Post Guidelines.](guidelines.qmd) -[R Consortium blog archive (2015-2024)](https://www.r-consortium.org/news/blog) +[R Consortium blog archive (2015-2024)](https://archive.r-consortium.org/news/blog)