From 50fc3db289d159b2cb0bf566f368b20446e3581b Mon Sep 17 00:00:00 2001 From: OganM Date: Tue, 13 Feb 2024 22:52:57 -0800 Subject: [PATCH] fix to gemma_kable --- R/kable.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/kable.R b/R/kable.R index fd4ca008..be3dadf2 100644 --- a/R/kable.R +++ b/R/kable.R @@ -9,9 +9,9 @@ gemma_kable <- function(table){ for(i in seq_len(ncol(table))){ if(class(table[[i]]) == 'character'){ - table[[i]][nchar(table[[i]])>30] %>% sapply(function(x){ + table[[i]][nchar(table[[i]])>30] <- table[[i]][nchar(table[[i]])>30] %>% sapply(function(x){ if(grepl('^http',x)){ - x <- glue::glue("{stringr::str_extract(x,'^.*?[.].*?[.]')}../{basename(x)}") + x <- glue::glue("{stringr::str_extract(x,'^.*?[.].*?[./]')}../{basename(x)}") } else{ x %>% stringr::str_trunc(30) }