Browse Source

Merge remote-tracking branch 'origin/fix' into dev

tags/0.1.8^2
Maxime Wack 4 years ago
parent
commit
be8b9278b5
7 changed files with 105 additions and 38 deletions
  1. +3
    -2
      DESCRIPTION
  2. +1
    -1
      R/build.R
  3. +18
    -6
      man/chisq.test.Rd
  4. +45
    -17
      man/datatable.Rd
  5. +2
    -4
      man/desctable.Rd
  6. +26
    -5
      man/fisher.test.Rd
  7. +10
    -3
      man/pander.desctable.Rd

+ 3
- 2
DESCRIPTION View File

@@ -1,7 +1,8 @@
Package: desctable Package: desctable
Title: Produce Descriptive and Comparative Tables Easily Title: Produce Descriptive and Comparative Tables Easily
Version: 0.1.7 Version: 0.1.7
Authors@R: person("Maxime", "Wack", email = "maximewack@free.fr", role = c("aut", "cre"))
Authors@R: c(person("Maxime", "Wack", email = "maximewack@free.fr", role = c("aut", "cre")),
person("Adrien", "Boukobza", email = "hadrien_b@hotmail.fr", role = c("aut")))
Description: Easily create descriptive and comparative tables. Description: Easily create descriptive and comparative tables.
It makes use and integrates directly with the tidyverse family of packages, and pipes. It makes use and integrates directly with the tidyverse family of packages, and pipes.
Tables are produced as data frames/lists of data frames for easy manipulation after creation, Tables are produced as data frames/lists of data frames for easy manipulation after creation,
@@ -23,5 +24,5 @@ Suggests:
rmarkdown, rmarkdown,
purrr, purrr,
survival survival
RoxygenNote: 6.1.1
RoxygenNote: 7.0.2
VignetteBuilder: knitr VignetteBuilder: knitr

+ 1
- 1
R/build.R View File

@@ -137,7 +137,7 @@ varColumn <- function(data, labels = NULL) {
#' @export #' @export
#' @examples #' @examples
#' iris %>% #' iris %>%
#' desctable
#' desctable()
#' #'
#' # Does the same as stats_auto here #' # Does the same as stats_auto here
#' iris %>% #' iris %>%


+ 18
- 6
man/chisq.test.Rd View File

@@ -11,13 +11,25 @@ The code for Monte Carlo simulation is a C translation of the Fortran algorithm
\usage{ \usage{
chisq.test(x, y, correct, p, rescale.p, simulate.p.value, B) chisq.test(x, y, correct, p, rescale.p, simulate.p.value, B)


\method{chisq.test}{default}(x, y = NULL, correct = TRUE,
p = rep(1/length(x), length(x)), rescale.p = FALSE,
simulate.p.value = FALSE, B = 2000)
\method{chisq.test}{default}(
x,
y = NULL,
correct = TRUE,
p = rep(1/length(x), length(x)),
rescale.p = FALSE,
simulate.p.value = FALSE,
B = 2000
)


\method{chisq.test}{formula}(x, y = NULL, correct = T,
p = rep(1/length(x), length(x)), rescale.p = F,
simulate.p.value = F, B = 2000)
\method{chisq.test}{formula}(
x,
y = NULL,
correct = T,
p = rep(1/length(x), length(x)),
rescale.p = F,
simulate.p.value = F,
B = 2000
)
} }
\arguments{ \arguments{
\item{x}{a numeric vector, or matrix, or formula of the form \code{lhs ~ rhs} where \code{lhs} and \code{rhs} are factors. \code{x} and \code{y} can also both be factors.} \item{x}{a numeric vector, or matrix, or formula of the form \code{lhs ~ rhs} where \code{lhs} and \code{rhs} are factors. \code{x} and \code{y} can also both be factors.}


+ 45
- 17
man/datatable.Rd View File

@@ -8,26 +8,48 @@
\usage{ \usage{
datatable(data, ...) datatable(data, ...)


\method{datatable}{default}(data, options = list(), class = "display",
callback = DT::JS("return table;"), caption = NULL,
filter = c("none", "bottom", "top"), escape = TRUE,
style = "default", width = NULL, height = NULL, elementId = NULL,
\method{datatable}{default}(
data,
options = list(),
class = "display",
callback = DT::JS("return table;"),
caption = NULL,
filter = c("none", "bottom", "top"),
escape = TRUE,
style = "default",
width = NULL,
height = NULL,
elementId = NULL,
fillContainer = getOption("DT.fillContainer", NULL), fillContainer = getOption("DT.fillContainer", NULL),
autoHideNavigation = getOption("DT.autoHideNavigation", NULL), autoHideNavigation = getOption("DT.autoHideNavigation", NULL),
selection = c("multiple", "single", "none"), extensions = list(),
plugins = NULL, ...)

\method{datatable}{desctable}(data, options = list(paging = F, info = F,
search = F, dom = "Brtip", fixedColumns = T, fixedHeader = T, buttons =
c("copy", "excel")), class = "display",
callback = DT::JS("return table;"), caption = NULL,
filter = c("none", "bottom", "top"), escape = FALSE,
style = "default", width = NULL, height = NULL, elementId = NULL,
selection = c("multiple", "single", "none"),
extensions = list(),
plugins = NULL,
...
)

\method{datatable}{desctable}(
data,
options = list(paging = F, info = F, search = F, dom = "Brtip", fixedColumns = T,
fixedHeader = T, buttons = c("copy", "excel")),
class = "display",
callback = DT::JS("return table;"),
caption = NULL,
filter = c("none", "bottom", "top"),
escape = FALSE,
style = "default",
width = NULL,
height = NULL,
elementId = NULL,
fillContainer = getOption("DT.fillContainer", NULL), fillContainer = getOption("DT.fillContainer", NULL),
autoHideNavigation = getOption("DT.autoHideNavigation", NULL), autoHideNavigation = getOption("DT.autoHideNavigation", NULL),
selection = c("multiple", "single", "none"), selection = c("multiple", "single", "none"),
extensions = c("FixedHeader", "FixedColumns", "Buttons"), extensions = c("FixedHeader", "FixedColumns", "Buttons"),
plugins = NULL, rownames = F, digits = 2, ...)
plugins = NULL,
rownames = F,
digits = 2,
...
)
} }
\arguments{ \arguments{
\item{data}{a data object (either a matrix or a data frame)} \item{data}{a data object (either a matrix or a data frame)}
@@ -65,10 +87,15 @@ to escape the whole table, and \code{FALSE} means not to escape it;
alternatively, you can specify numeric column indices or column names to alternatively, you can specify numeric column indices or column names to
indicate which columns to escape, e.g. \code{1:5} (the first 5 columns), indicate which columns to escape, e.g. \code{1:5} (the first 5 columns),
\code{c(1, 3, 4)}, or \code{c(-1, -3)} (all columns except the first and \code{c(1, 3, 4)}, or \code{c(-1, -3)} (all columns except the first and
third), or \code{c('Species', 'Sepal.Length')}}
third), or \code{c('Species', 'Sepal.Length')}; since the row names take
the first column to display, you should add the numeric column indices
by one when using \code{rownames}}


\item{style}{the style name (\url{http://datatables.net/manual/styling/}); \item{style}{the style name (\url{http://datatables.net/manual/styling/});
currently only \code{'default'} and \code{'bootstrap'} are supported}
currently only \code{'default'}, \code{'bootstrap'}, and
\code{'bootstrap4'} are supported. Note that DT doesn't contain the theme
files so in order to display the style correctly, you have to link
the necessary files in the header.}


\item{width}{Width/Height in pixels (optional, defaults to automatic \item{width}{Width/Height in pixels (optional, defaults to automatic
sizing)} sizing)}
@@ -99,7 +126,8 @@ extensions (\url{https://datatables.net/extensions/index})}


\item{plugins}{a character vector of the names of DataTables plug-ins \item{plugins}{a character vector of the names of DataTables plug-ins
(\url{https://rstudio.github.io/DT/plugins.html}). Note that only those (\url{https://rstudio.github.io/DT/plugins.html}). Note that only those
plugins supported by the \code{DT} package can be used here.}
plugins supported by the \code{DT} package can be used here. You can see
the available plugins by calling \code{DT:::available_plugins()}}


\item{rownames}{\code{TRUE} (show row names) or \code{FALSE} (hide row names) \item{rownames}{\code{TRUE} (show row names) or \code{FALSE} (hide row names)
or a character vector of row names; by default, the row names are displayed or a character vector of row names; by default, the row names are displayed


+ 2
- 4
man/desctable.Rd View File

@@ -8,11 +8,9 @@
\usage{ \usage{
desctable(data, stats, tests, labels) desctable(data, stats, tests, labels)


\method{desctable}{default}(data, stats = stats_auto, tests,
labels = NULL)
\method{desctable}{default}(data, stats = stats_auto, tests, labels = NULL)


\method{desctable}{grouped_df}(data, stats = stats_auto,
tests = tests_auto, labels = NULL)
\method{desctable}{grouped_df}(data, stats = stats_auto, tests = tests_auto, labels = NULL)
} }
\arguments{ \arguments{
\item{data}{The dataframe to analyze} \item{data}{The dataframe to analyze}


+ 26
- 5
man/fisher.test.Rd View File

@@ -6,14 +6,35 @@
\alias{fisher.test.formula} \alias{fisher.test.formula}
\title{Fisher's Exact Test for Count Data} \title{Fisher's Exact Test for Count Data}
\usage{ \usage{
fisher.test(x, y, workspace, hybrid, control, or, alternative, conf.int,
conf.level, simulate.p.value, B)
fisher.test(
x,
y,
workspace,
hybrid,
control,
or,
alternative,
conf.int,
conf.level,
simulate.p.value,
B
)


\method{fisher.test}{default}(x, ...) \method{fisher.test}{default}(x, ...)


\method{fisher.test}{formula}(x, y = NULL, workspace = 200000,
hybrid = F, control = list(), or = 1, alternative = "two.sided",
conf.int = T, conf.level = 0.95, simulate.p.value = F, B = 2000)
\method{fisher.test}{formula}(
x,
y = NULL,
workspace = 200000,
hybrid = F,
control = list(),
or = 1,
alternative = "two.sided",
conf.int = T,
conf.level = 0.95,
simulate.p.value = F,
B = 2000
)
} }
\arguments{ \arguments{
\item{x}{either a two-dimensional contingency table in matrix form, a factor object, or a formula of the form \code{lhs ~ rhs} where \code{lhs} and \code{rhs} are factors.} \item{x}{either a two-dimensional contingency table in matrix form, a factor object, or a formula of the form \code{lhs ~ rhs} where \code{lhs} and \code{rhs} are factors.}


+ 10
- 3
man/pander.desctable.Rd View File

@@ -4,9 +4,16 @@
\alias{pander.desctable} \alias{pander.desctable}
\title{Pander method for desctable} \title{Pander method for desctable}
\usage{ \usage{
pander.desctable(x = NULL, digits = 2, justify = "left",
missing = "", keep.line.breaks = T, split.tables = Inf,
emphasize.rownames = F, ...)
pander.desctable(
x = NULL,
digits = 2,
justify = "left",
missing = "",
keep.line.breaks = T,
split.tables = Inf,
emphasize.rownames = F,
...
)
} }
\arguments{ \arguments{
\item{x}{A desctable} \item{x}{A desctable}


Loading…
Cancel
Save