Skip to content

Commit

Permalink
Fix some problems with format_html of 'mtable' output
Browse files Browse the repository at this point in the history
  • Loading branch information
melff committed Oct 26, 2018
1 parent 7868c9c commit 6f334bc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/R/mtable-format-html.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pf_mtable_format_html <- function(x,
l.headers <- length(headers)
l.leaders <- length(leaders)

ncols <- sapply(pt[1,],ncol)
ncols <- sapply(pt[1,,drop=FALSE],ncol)

sh.nonnull <- !Sapply(sh,is.null)
need.sh <- apply(sh.nonnull,1,any)
Expand Down Expand Up @@ -236,7 +236,13 @@ pf_mtable_format_html <- function(x,
signif.template,
width=72)

totspan <- sum(sapply(res[[1]],get_colspan))
if(split.dec)
totspan <- ncols * 3
else
totspan <- ncols
if(l.leaders)
totspan <- totspan + 1

signif.symbols <- html_p(signif.symbols,style=css(sig.notes.style))
signif.symbols <- html_td(signif.symbols,style=css(style),colspan=totspan)
res <- c(res,list(signif.symbols))
Expand Down

0 comments on commit 6f334bc

Please sign in to comment.