Skip to content

Commit

Permalink
Autoprinting toHTML output also
Browse files Browse the repository at this point in the history
causes CRAN issues.
  • Loading branch information
dmurdoch committed May 2, 2023
1 parent 69e6e66 commit 9cde93a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tables
Title: Formula-Driven Table Generation
Version: 0.9.16
Version: 0.9.17
Author: Duncan Murdoch
Description: Computes and displays complex tables of summary statistics.
Output may be in LaTeX, HTML, plain text, or an R
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tables 0.9.16
# tables 0.9.17

- Change host to Github.
- Add `useGroupLabels()` function.
Expand Down
5 changes: 5 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# tables 0.9.17

It didn't fix the issue; some of the example results in \donttest sections
were autoprinting as browsable HTML.

# tables 0.9.16

This version doesn't call browseURL() non-interactively
Expand Down
3 changes: 2 additions & 1 deletion man/HTMLfootnotes.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ tab <- tabular( (Species + 1) ~ (n=1) + Format(digits=2)*
footnote <- HTMLfootnotes(tab,
"This is a footnote with no marker.",
"*" = "This is a footnote with an asterisk.")
toHTML(tab, options = list(doFooter = TRUE,
if (interactive())
toHTML(tab, options = list(doFooter = TRUE,
HTMLfooter = footnote))
}
12 changes: 8 additions & 4 deletions man/html.tabular.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,28 @@ table_options(rowlabeljustification="c")
f <- tempfile(fileext=".html")
con <- file(f, "wt")
toHTML(tab, con, options=htmloptions(head=TRUE, table=FALSE))
if (interactive())
toHTML(tab, con, options=htmloptions(head=TRUE, table=FALSE))
writeLines("<p>This table has pad = FALSE. The centered numbers look
sloppy.<br>", con)
toHTML(tab, con, options=htmloptions(head=FALSE, table=TRUE, pad=FALSE))
if (interactive())
toHTML(tab, con, options=htmloptions(head=FALSE, table=TRUE, pad=FALSE))
writeLines("<p>This table has pad = FALSE and justification=\"r\".
The justification makes the columns of numbers look all right (except
for the hyphens used as minus signs), but they are placed poorly
relative to the labels.<br>", con)
toHTML(tab, con, options=htmloptions(head=FALSE, table=TRUE, pad=FALSE, justification="r"))
if (interactive())
toHTML(tab, con, options=htmloptions(head=FALSE, table=TRUE, pad=FALSE, justification="r"))
writeLines("<p>This one has pad = TRUE. It looks best, but if you cut
and paste, the spacing characters may cause problems.<br>", con)
toHTML(tab, con, options=htmloptions(head=FALSE, table=TRUE, pad=TRUE))
if (interactive())
toHTML(tab, con, options=htmloptions(head=FALSE, table=TRUE, pad=TRUE))
table_options(save)
close(con)
Expand Down
5 changes: 3 additions & 2 deletions man/table_options.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ table_options(save)

\donttest{
f <- tempfile(fileext = ".html")
toHTML(tab, f,
options=htmloptions(HTMLcaption="Table of Iris Data",
if (interactive())
toHTML(tab, f,
options=htmloptions(HTMLcaption="Table of Iris Data",
pad = TRUE))
}
}

0 comments on commit 9cde93a

Please sign in to comment.