I still came up with a workaround by rewriting the texreg function, adding the custom.note.wrap argument and changing:
note <- paste0("\\multicolumn{", length(models) + 1, "}{l}{\\", notesize, "{", custom.note, "}}") note <- gsub("%stars", snote, note, perl = TRUE)
To:
if (custom.note.wrap){ note<-paste(paste0("\\multicolumn{", length(models) + 1L,"}{l}{\\",notesize,"{", strwrap(custom.note, width=custom.note.wrap), "}}"), collapse = " \\ \n") note <- gsub("%stars", snote, note, perl = TRUE) }else{ note <- paste0("\\multicolumn{", length(models) + 1L, "}{l}{\\", notesize, "{", custom.note, "}}") note <- gsub("%stars", snote, note, perl = TRUE) }
The idea is to select the maximum string length for each string ( custom.note.wrap ), and then split the provided note into strings of no more than length that end in space, finally concatenating everything into a multicolumn string with each split substring.
This is not optimal, since it would be better to texreg (be able to) automatically set custom.note.wrap taking into account the lengths of model names, etc. But my raw LaTeX features are missing, so I'm not sure how to do this.