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) }