diff --git a/R/table_biomass_abundance_catch.R b/R/table_biomass_abundance_catch.R index cbeac771..8831b27d 100644 --- a/R/table_biomass_abundance_catch.R +++ b/R/table_biomass_abundance_catch.R @@ -169,7 +169,7 @@ table_biomass_abundance_catch <- function( create_rda( object = final_table, # get name of function and remove "table_" from it - topic_label = gsub("table_", "", as.character(sys.call()[[1]])), + topic_label = gsub("table_", "", utils::tail(as.character(sys.call()[[1]]), n = 1)), fig_or_table = "table", dat = dat, dir = tables_dir, diff --git a/R/table_index.R b/R/table_index.R index 12d11862..50e39baf 100644 --- a/R/table_index.R +++ b/R/table_index.R @@ -155,7 +155,7 @@ table_index <- function( create_rda( object = final[[1]], # get name of function and remove "table_" from it - topic_label = gsub("table_", "", as.character(sys.call()[[1]])), + topic_label = gsub("table_", "", utils::tail(as.character(sys.call()[[1]]), n = 1)), fig_or_table = "table", dat = dat, dir = tables_dir,