Skip to content

Commit

Permalink
print to return original options
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonStanley committed Jan 7, 2024
1 parent 5b81862 commit 09c19fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ dt_print_options <- function(class = TRUE,
rownames = TRUE,
nrows = 100,
trunc.cols = TRUE) {
old <- options()
if (isTRUE(class)) options("datatable.print.class" = TRUE)
options("datatable.print.topn" = topn)
options("datatable.print.nrows" = nrows)
options("datatable.print.rownames" = rownames)
if (packageVersion("data.table") >= "1.12.9") {
options("datatable.print.trunc.cols" = trunc.cols)
}
invisible(old)
}

0 comments on commit 09c19fe

Please sign in to comment.