Skip to content

Commit

Permalink
fix to gemma_kable
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed Feb 14, 2024
1 parent 6426243 commit 50fc3db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/kable.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 50fc3db

Please sign in to comment.