Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to include the head in the output #19

Merged
merged 5 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: btabler
Title: Nice Formatting For LaTeX Tables
Version: 0.0.2
Version: 0.0.3
Authors@R:
c(
person(given = "Lukas", family = "Bütikofer", role = c("cre", "aut"),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# btabler 0.0.3

* Added a `NEWS.md` file to track changes to the package.
* Added option `include.varnames` option to `btable`.
4 changes: 3 additions & 1 deletion R/btable.r
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#' @param sfile sanitizing file for latex, dataframe with two columns, pattern and replacement
#' @param print logical, indicates whether table should be printed, TRUE by default
#' @param comment logical, indicates whether xtable should print it's comment, FALSE by default
#' @param include.colnames logical, indicated whether the columns names are printed, FALSE by default.
#' @param ... further arguments passed to print.xtable()
#'
#' @return table in latex format
Expand Down Expand Up @@ -107,6 +108,7 @@ btable<-function(dat,
sfile="",
print=TRUE,
comment = FALSE,
include.colnames = FALSE,
...) {


Expand Down Expand Up @@ -372,7 +374,7 @@ btable<-function(dat,
}

#ptint xtable
xtp<-print(xt,include.rownames=FALSE,include.colnames=FALSE,sanitize.text.function=sf,
xtp<-print(xt,include.rownames=FALSE,include.colnames=include.colnames,sanitize.text.function=sf,
booktabs = TRUE,hline.after=hlinea,
caption.placement = "top", latex.environments = "center",
table.placement=table.placement,
Expand Down
3 changes: 3 additions & 0 deletions man/btable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.