Skip to content

Commit

Permalink
fix bug cran check
Browse files Browse the repository at this point in the history
  • Loading branch information
lrberge committed Jun 12, 2024
1 parent 940533f commit 4a80f0d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/etable.R
Original file line number Diff line number Diff line change
Expand Up @@ -2857,23 +2857,23 @@ results2formattedList = function(dots, vcov = NULL, ssc = getFixest_ssc(), stage

# Now the aliases
fitstat_dict_new = c()
fun_rename = function(x, isTex) {
fun_rename_stats = function(x, isTex) {
if(!grepl("::", x, fixed = TRUE)) return(fitstat_dict[x])

xx = strsplit(x, "::")[[1]]

res = paste0(fitstat_dict[xx[1]], ", ", dict_apply(xx[2], dict))

if(isTex) {
# LB: we should NOT escape before applying the dictionnary
res = escape_latex(res)
var = dict_apply(xx[2], dict)
if(isTex){
var = escape_latex(var)
}

res = paste0(fitstat_dict[xx[1]], ", ", var)

res
}

for(v in all_names_new){
fitstat_dict_new[v] = fun_rename(v, isTex)
fitstat_dict_new[v] = fun_rename_stats(v, isTex)
}

fitstat_list = fitstat_list_new
Expand Down

0 comments on commit 4a80f0d

Please sign in to comment.