From cbea5d160228a3eefd880e038a769a8a0a3d5553 Mon Sep 17 00:00:00 2001 From: kaz-yos Date: Sat, 15 Feb 2014 10:33:46 -0500 Subject: [PATCH] documents completed --- DESCRIPTION | 2 +- NEWS | 24 ++++++++++++------------ R/CreateContTable.R | 8 +++----- R/CreateTableOne.R | 21 +++++++++++++-------- R/ShowRegTable.R | 24 +++++++----------------- R/print.CatTable.R | 4 +--- R/print.ContTable.R | 4 +--- R/print.TableOne.R | 15 +++++++++++---- R/summary.CatTable.R | 6 +----- R/summary.ContTable.R | 6 +----- R/summary.TableOne.R | 5 ----- R/tableone-package.R | 13 +++++++++++-- man/CreateContTable.Rd | 8 ++++---- man/CreateTableOne.Rd | 11 +++++++++-- man/ShowRegTable.Rd | 12 ++---------- man/print.CatTable.Rd | 5 +++-- man/print.ContTable.Rd | 5 +++-- man/print.TableOne.Rd | 16 +++++++++++++--- man/summary.CatTable.Rd | 9 +++++---- man/summary.ContTable.Rd | 7 ++++--- man/summary.TableOne.Rd | 5 ----- man/tableone-package.Rd | 13 ++++++++++++- 22 files changed, 117 insertions(+), 106 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c1c44c1..9797ef6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: tableone Type: Package Title: Create "Table 1" to describe baseline characteristics Version: 0.2.1 -Date: 2014-02-14 +Date: 2014-02-15 Author: Kazuki Yoshida, Justin Bohn Maintainer: Kazuki Yoshida Description: This package creates "Table 1", i.e., description of baseline diff --git a/NEWS b/NEWS index dacfcd9..284c9ff 100644 --- a/NEWS +++ b/NEWS @@ -1,27 +1,27 @@ -tableone 0.2.0 +tableone 0.2.1 (2014-02-15) ---------------------------------------------------------------- -NEW FEATURES - -* CreateTableOne and related print/summary methods were added. +BUG FIXES -* CreateTableOne can crate a table with both categorical and - continuous variables. +* Documentations were fixed to represent the current version. -tableone 0.1.3 +tableone 0.2.0 (2014-02-14) ---------------------------------------------------------------- NEW FEATURES -* The print method can suppress printing by printToggle option. +* CreateTableOne and related print/summary methods were added. -* (CreateTableOne and related print and summary methods are introduced). +* CreateTableOne can crate a table with both categorical and + continuous variables. + +* The print method can suppress printing by printToggle option. BUG FIXES * In the Roxygen part of the code, only at_export followed by nothing is used. -tableone 0.1.2 +tableone 0.1.2 (2014-02-09) ---------------------------------------------------------------- BUG FIXES @@ -33,7 +33,7 @@ BUG FIXES * Passed all the default tests by R CMD check file.tar.gz -tableone 0.1.1 +tableone 0.1.1 (2014-02-09) ---------------------------------------------------------------- BUG FIXES @@ -42,7 +42,7 @@ BUG FIXES * Documents are now included in -tableone 0.1.0 +tableone 0.1.0 (2014-02-08) ---------------------------------------------------------------- FIRST DEVELOPMENTAL VERSION diff --git a/R/CreateContTable.R b/R/CreateContTable.R index 8d96ab0..9564427 100644 --- a/R/CreateContTable.R +++ b/R/CreateContTable.R @@ -16,9 +16,8 @@ ##' kurtosis (same definition as in SAS). All of them can be seen in the ##' summary method output. The print method uses subset of these. You can ##' choose subset of them or reorder them. They are all configure to omit NA -##' values (na.rm = TRUE). -##' @param func.additional Additional functions can be given as a named list. -##' For example, list(sum = sum). +##' values (\code{na.rm = TRUE}). +##' @param func.additional Additional functions can be given as a named list. For example, \code{list(sum = sum)}. ##' @param test If TRUE, as in the default and there are more than two groups, ##' groupwise comparisons are performed. Both tests that assume normality and ##' tests that do not are performed. Either one of the result can be obtained @@ -27,7 +26,7 @@ ##' tests. The default is \code{\link{oneway.test}}. This is equivalent of the t-test when there are only two groups. ##' @param argsNormal A named list of arguments passed to the function specified in \code{testNormal}. The default is \code{list(var.equal = TRUE)}, which makes it the ordinary ANOVA that assumes equal variance across groups. ##' @param testNonNormal A function used to perform the nonparametric tests. -##' The default is \code{kruskal.test} (Kruskal-Wallis Rank Sum Test). This is +##' The default is \code{kruskal.test} (Kruskal-Wallis rank sum test). This is ##' equivalent of the wilcox.test (Man-Whitney U test) when there are only two ##' groups. ##' @param argsNonNormal A named list of arguments passed to the function specified in \code{testNonNormal}. The default is \code{list(NULL)}, which is just a placeholder. @@ -53,7 +52,6 @@ ##' ## Create an overall table for continuous variables ##' contVars <- c("time","age","bili","chol","albumin","copper", ##' "alk.phos","ast","trig","platelet","protime") -##' ##' contTableOverall <- CreateContTable(vars = contVars, data = pbc) ##' ##' ## Simply typing the object name will invoke the print.ContTable method, diff --git a/R/CreateTableOne.R b/R/CreateTableOne.R index 8cad3f7..771ee11 100644 --- a/R/CreateTableOne.R +++ b/R/CreateTableOne.R @@ -1,9 +1,7 @@ ##' Create an object summarizing both categorical and continuous variables ##' -##' Create an object summarizing categorical variables optionally stratifying -##' by one or more startifying variables and performing statistical tests. The -##' object gives a table that is easy to use in medical research papers. See also \code{\link{print.TableOne}} and \code{\link{summary.TableOne}}. -##' +##' Create an object summarizing all baseline variables optionally stratifying by one or more startifying variables and performing statistical tests. The object gives a table that is easy to use in medical research papers. See also \code{\link{print.TableOne}} and \code{\link{summary.TableOne}}. +##' ##' @param vars Variables to be summarized given as a character vector. Factors are ##' handled as categorical variables, whereas numeric variables are handled as continuous variables. ##' @param strata Stratifying (grouping) variable name(s) given as a character @@ -29,19 +27,19 @@ ##' memory limitation. In this situation, the large sample approximation based ##' should suffice. ##' @param argsExact A named list of arguments passed to the function specified in testExact. The default is \code{list(workspace = 2*10^5)}, which specifies the memory space allocated for \code{\link{fisher.test}}. -##' @return An object of class \code{TableOne}, which really is a list of three objects. +##' @return An object of class \code{TableOne}, which really is a list of three objects. ##' @return \item{TableOne}{a categorical-continuous mixture data formatted and printed by the \code{\link{print.TableOne}} method} ##' @return \item{ContTable}{an object of class \code{ContTable}, containing continuous variables only} ##' @return \item{CatTable}{ an object of class \code{CatTable}, containing categorical variables only} ##' @return The second and third objects can be then be examined with the \code{print} and \code{summary} method, for example, \code{summary(object$CatTable)} to examine the categorical variables in detail. -##' +##' ##' @author Justin Bohn, Kazuki Yoshida ##' @seealso ##' \code{\link{CreateTableOne}}, \code{\link{print.TableOne}}, \code{\link{summary.TableOne}}, ##' \code{\link{CreateCatTable}}, \code{\link{print.CatTable}}, \code{\link{summary.CatTable}}, ##' \code{\link{CreateContTable}}, \code{\link{print.ContTable}}, \code{\link{summary.ContTable}} ##' @examples -##' +##' ##' ## Load ##' library(tableone) ##' @@ -71,7 +69,8 @@ ##' ## Specifying nonnormal variables will show the variables appropriately, ##' ## and show nonparametric test p-values. Specify variables in the exact ##' ## argument to obtain the exact test p-values. -##' print(tableOne, nonnormal = c("time"), exact = c("ascites")) +##' print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), +##' exact = c("status","stage")) ##' ##' ## Use the summary.TableOne method for detailed summary ##' summary(tableOne) @@ -84,6 +83,12 @@ ##' tableOne$ContTable ##' summary(tableOne$ContTable) ##' +##' ## If your work flow includes copying to Excel and Word when writing manuscripts, +##' ## you may benefit from the quote argument. This will quote everything so that +##' ## Excel does not mess up the cells. +##' print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), +##' exact = c("status","stage"), quote = TRUE) +##' ##' @export CreateTableOne <- function(vars, # character vector of variable names diff --git a/R/ShowRegTable.R b/R/ShowRegTable.R index bb49457..96b4040 100644 --- a/R/ShowRegTable.R +++ b/R/ShowRegTable.R @@ -1,23 +1,15 @@ ##' Format regression results in medically decent format ##' -##' It shows the regression result in the HR [95\% CI] p-value format, which is -##' usually the form used in medical research papers. +##' It shows the regression result in the HR [95\% CI] p-value format, which is usually the form used in medical research papers. ##' ##' -##' @param model Regression model result objects that have the summary and -##' confint methods. -##' @param exp TRUE by default. You need to specify exp = FALSE if your model -##' is has the indentity link function (linear regression, etc). +##' @param model Regression model result objects that have the summary and confint methods. +##' @param exp TRUE by default. You need to specify exp = FALSE if your model is has the indentity link function (linear regression, etc). ##' @param digits Number of digits to print for the main part. ##' @param pDigits Number of digits to print for the p-values. -##' @param quote Whether to show everything in quotes. The default is FALSE. If -##' TRUE, everything including the row and column names are quoted so that you -##' can copy it to Excel easily. -##' @return A matrix containing what you see is returned invisibly. You can -##' capture it by assignment to an object. +##' @param quote Whether to show everything in quotes. The default is FALSE. If TRUE, everything including the row and column names are quoted so that you can copy it to Excel easily. +##' @return A matrix containing what you see is returned invisibly. You can capture it by assignment to an object. ##' @author Kazuki Yoshida -##' @seealso CreateContTable, \code{\link{print.ContTable}}, \code{\link{summary.ContTable}}, -##' \code{\link{CreateCatTable}}, \code{\link{print.CatTable}}, \code{\link{summary.CatTable}} ##' @examples ##' ##' ## Load @@ -30,10 +22,8 @@ ##' head(pbc) ##' ##' ## Fit a Cox regression model -##' objCoxph <- -##' coxph(formula = Surv(time, status == 2) ~ trt + age + albumin + ascites, -##' data = pbc, -##' ties = c("efron","breslow","exact")[1]) +##' objCoxph <- coxph(formula = Surv(time, status == 2) ~ trt + age + albumin + ascites, +##' data = pbc) ##' ##' ## Show the simple table ##' ShowRegTable(objCoxph) diff --git a/R/print.CatTable.R b/R/print.CatTable.R index 04cac71..22de2ef 100644 --- a/R/print.CatTable.R +++ b/R/print.CatTable.R @@ -1,8 +1,6 @@ ##' Format and print the \code{CatTable} class objects ##' -##' This is the print method for the CatTable class objects created by -##' CreateCatTable function. -##' +##' This is the \code{print} method for the \code{CatTable} class objects created by \code{\link{CreateCatTable}} function. ##' ##' @param x The result of a call to the \code{\link{CreateCatTable}} function. ##' @param missing Whether to show missing data information (not implemented diff --git a/R/print.ContTable.R b/R/print.ContTable.R index 146aedc..3fc39ad 100644 --- a/R/print.ContTable.R +++ b/R/print.ContTable.R @@ -1,8 +1,6 @@ ##' Format and print the \code{ContTable} class objects ##' -##' This is the print method for the ContTable class objects created by -##' CreateContTable function. -##' +##' This is the \code{print} method for the \code{ContTable} class objects created by \code{\link{CreateContTable}} function. ##' ##' @param x The result of a call to the \code{\link{CreateContTable}} function. ##' @param missing Whether to show missing data information (not implemented diff --git a/R/print.TableOne.R b/R/print.TableOne.R index 29b0bde..111183c 100644 --- a/R/print.TableOne.R +++ b/R/print.TableOne.R @@ -1,8 +1,6 @@ ##' Format and print the \code{TableOne} class objects ##' -##' This is the print method for the TableOne class objects created by -##' CreateTableOne function. -##' +##' This is the \code{print} method for the \code{TableOne} class objects created by \code{\link{CreateTableOne}} function. ##' ##' @param x The result of a call to the \code{\link{CreateTableOne}} function. ##' @param missing Whether to show missing data information (not implemented @@ -65,10 +63,19 @@ ##' ## Specifying nonnormal variables will show the variables appropriately, ##' ## and show nonparametric test p-values. Specify variables in the exact ##' ## argument to obtain the exact test p-values. -##' print(tableOne, nonnormal = c("time"), exact = c("ascites")) +##' print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), +##' exact = c("status","stage")) ##' ##' ## Use the summary.TableOne method for detailed summary ##' summary(tableOne) +##' +##' ## See the categorical part only using $ operator +##' tableOne$CatTable +##' summary(tableOne$CatTable) +##' +##' ## See the continuous part only using $ operator +##' tableOne$ContTable +##' summary(tableOne$ContTable) ##' ##' @export print.TableOne <- function(x, missing = FALSE, diff --git a/R/summary.CatTable.R b/R/summary.CatTable.R index f9174c6..0c1e1d2 100644 --- a/R/summary.CatTable.R +++ b/R/summary.CatTable.R @@ -1,10 +1,6 @@ ##' Shows all results in a \code{CatTable} class object ##' -##' This method shows all the data a CatTable class object has. This includes -##' the (optionally stratified) part with summary statistics and p-values from -##' the approximation method test (chisq.test by default) and exact method test -##' (fisher.test by default). -##' +##' This method shows all the data a \code{CatTable} class object has. This includes the (optionally stratified) part with summary statistics and , if available, p-values from the approximation method test (\code{\link{chisq.test}} by default) and exact method test (\code{\link{fisher.test}} by default). ##' ##' @param object An object that has the \code{CatTable} class to be shown. ##' @param digits Number of digits to print. diff --git a/R/summary.ContTable.R b/R/summary.ContTable.R index a464115..869e0aa 100644 --- a/R/summary.ContTable.R +++ b/R/summary.ContTable.R @@ -1,10 +1,6 @@ ##' Shows all results in a \code{ContTable} class object ##' -##' This method shows all the data a \code{ContTable} class object has. This includes -##' the (optionally stratified) part with summary statistics and p-values from -##' the normal assupmtion-based test (oneway.test by default) and nonparametric -##' test (kruskal.test by default). -##' +##' This method shows all the data a \code{ContTable} class object has. This includes the (optionally stratified) part with summary statistics and , if available, p-values from the normal assupmtion-based test (\code{\link{oneway.test}} by default) and nonparametric test (\code{\link{kruskal.test}} by default). ##' ##' @param object An object that has the \code{ContTable} class to be shown. ##' @param digits Number of digits to print. diff --git a/R/summary.TableOne.R b/R/summary.TableOne.R index fddf893..6dcfed6 100644 --- a/R/summary.TableOne.R +++ b/R/summary.TableOne.R @@ -40,11 +40,6 @@ ##' ## Just typing the object name will invoke the print.TableOne method ##' tableOne ##' -##' ## Specifying nonnormal variables will show the variables appropriately, -##' ## and show nonparametric test p-values. Specify variables in the exact -##' ## argument to obtain the exact test p-values. -##' print(tableOne, nonnormal = c("time"), exact = c("ascites")) -##' ##' ## Use the summary.TableOne method for detailed summary ##' summary(tableOne) ##' diff --git a/R/tableone-package.R b/R/tableone-package.R index e874d18..176ebb9 100644 --- a/R/tableone-package.R +++ b/R/tableone-package.R @@ -11,6 +11,8 @@ ##' ##' Hadley Wickham for packaging advice and for creating tools this package was made with (roxygen2, devtools, testthat). ##' +##' Members of Facebook Organization of R Users for Medical Statistics in Japan (FORUMS-J) for testing pre-release versions. +##' ##' Developmental repository is on github. Your contributions are appreciated. ##' ##' https://github.com/kaz-yos/tableone @@ -54,11 +56,12 @@ ##' ## Specifying nonnormal variables will show the variables appropriately, ##' ## and show nonparametric test p-values. Specify variables in the exact ##' ## argument to obtain the exact test p-values. -##' print(tableOne, nonnormal = c("time"), exact = c("ascites")) +##' print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), +##' exact = c("status","stage")) ##' ##' ## Use the summary.TableOne method for detailed summary ##' summary(tableOne) -##' +##' ##' ## See the categorical part only using $ operator ##' tableOne$CatTable ##' summary(tableOne$CatTable) @@ -67,4 +70,10 @@ ##' tableOne$ContTable ##' summary(tableOne$ContTable) ##' +##' ## If your work flow includes copying to Excel and Word when writing manuscripts, +##' ## you may benefit from the quote argument. This will quote everything so that +##' ## Excel does not mess up the cells. +##' print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), +##' exact = c("status","stage"), quote = TRUE) +##' NULL diff --git a/man/CreateContTable.Rd b/man/CreateContTable.Rd index 6320cf7..ef0fcdd 100644 --- a/man/CreateContTable.Rd +++ b/man/CreateContTable.Rd @@ -26,10 +26,11 @@ CreateContTable(vars, strata, data, func.names = c("n", "miss", "mean", "sd", (same definition as in SAS). All of them can be seen in the summary method output. The print method uses subset of these. You can choose subset of them or reorder them. - They are all configure to omit NA values (na.rm = TRUE).} + They are all configure to omit NA values (\code{na.rm = + TRUE}).} \item{func.additional}{Additional functions can be given - as a named list. For example, list(sum = sum).} + as a named list. For example, \code{list(sum = sum)}.} \item{test}{If TRUE, as in the default and there are more than two groups, groupwise comparisons are performed. @@ -50,7 +51,7 @@ CreateContTable(vars, strata, data, func.names = c("n", "miss", "mean", "sd", \item{testNonNormal}{A function used to perform the nonparametric tests. The default is \code{kruskal.test} - (Kruskal-Wallis Rank Sum Test). This is equivalent of the + (Kruskal-Wallis rank sum test). This is equivalent of the wilcox.test (Man-Whitney U test) when there are only two groups.} @@ -87,7 +88,6 @@ head(pbc) ## Create an overall table for continuous variables contVars <- c("time","age","bili","chol","albumin","copper", "alk.phos","ast","trig","platelet","protime") - contTableOverall <- CreateContTable(vars = contVars, data = pbc) ## Simply typing the object name will invoke the print.ContTable method, diff --git a/man/CreateTableOne.Rd b/man/CreateTableOne.Rd index e4bc4ff..bc8e095 100644 --- a/man/CreateTableOne.Rd +++ b/man/CreateTableOne.Rd @@ -88,7 +88,7 @@ the \code{print} and \code{summary} method, for example, variables in detail. } \description{ -Create an object summarizing categorical variables +Create an object summarizing all baseline variables optionally stratifying by one or more startifying variables and performing statistical tests. The object gives a table that is easy to use in medical research papers. See also @@ -125,7 +125,8 @@ tableOne ## Specifying nonnormal variables will show the variables appropriately, ## and show nonparametric test p-values. Specify variables in the exact ## argument to obtain the exact test p-values. -print(tableOne, nonnormal = c("time"), exact = c("ascites")) +print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), + exact = c("status","stage")) ## Use the summary.TableOne method for detailed summary summary(tableOne) @@ -137,6 +138,12 @@ summary(tableOne$CatTable) ## See the continuous part only using $ operator tableOne$ContTable summary(tableOne$ContTable) + +## If your work flow includes copying to Excel and Word when writing manuscripts, +## you may benefit from the quote argument. This will quote everything so that +## Excel does not mess up the cells. +print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), + exact = c("status","stage"), quote = TRUE) } \author{ Justin Bohn, Kazuki Yoshida diff --git a/man/ShowRegTable.Rd b/man/ShowRegTable.Rd index 37ac8c7..e6b32b5 100644 --- a/man/ShowRegTable.Rd +++ b/man/ShowRegTable.Rd @@ -43,10 +43,8 @@ data(pbc) head(pbc) ## Fit a Cox regression model -objCoxph <- - coxph(formula = Surv(time, status == 2) ~ trt + age + albumin + ascites, - data = pbc, - ties = c("efron","breslow","exact")[1]) +objCoxph <- coxph(formula = Surv(time, status == 2) ~ trt + age + albumin + ascites, + data = pbc) ## Show the simple table ShowRegTable(objCoxph) @@ -57,10 +55,4 @@ ShowRegTable(objCoxph, quote = TRUE) \author{ Kazuki Yoshida } -\seealso{ -CreateContTable, \code{\link{print.ContTable}}, -\code{\link{summary.ContTable}}, -\code{\link{CreateCatTable}}, \code{\link{print.CatTable}}, -\code{\link{summary.CatTable}} -} diff --git a/man/print.CatTable.Rd b/man/print.CatTable.Rd index 4168660..37da460 100644 --- a/man/print.CatTable.Rd +++ b/man/print.CatTable.Rd @@ -60,8 +60,9 @@ does return a matrix containing what you see in the output invisibly. You can assign it to an object to save it. } \description{ -This is the print method for the CatTable class objects -created by CreateCatTable function. +This is the \code{print} method for the \code{CatTable} +class objects created by \code{\link{CreateCatTable}} +function. } \examples{ ## Load diff --git a/man/print.ContTable.Rd b/man/print.ContTable.Rd index 505a725..070cab4 100644 --- a/man/print.ContTable.Rd +++ b/man/print.ContTable.Rd @@ -47,8 +47,9 @@ does return a matrix containing what you see in the output invisibly. You can assign it to an object to save it. } \description{ -This is the print method for the ContTable class objects -created by CreateContTable function. +This is the \code{print} method for the \code{ContTable} +class objects created by \code{\link{CreateContTable}} +function. } \examples{ ## Load diff --git a/man/print.TableOne.Rd b/man/print.TableOne.Rd index 3c763a4..93ad684 100644 --- a/man/print.TableOne.Rd +++ b/man/print.TableOne.Rd @@ -62,8 +62,9 @@ does return a matrix containing what you see in the output invisibly. You can assign it to an object to save it. } \description{ -This is the print method for the TableOne class objects -created by CreateTableOne function. +This is the \code{print} method for the \code{TableOne} +class objects created by \code{\link{CreateTableOne}} +function. } \examples{ ## Load @@ -92,10 +93,19 @@ tableOne ## Specifying nonnormal variables will show the variables appropriately, ## and show nonparametric test p-values. Specify variables in the exact ## argument to obtain the exact test p-values. -print(tableOne, nonnormal = c("time"), exact = c("ascites")) +print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), + exact = c("status","stage")) ## Use the summary.TableOne method for detailed summary summary(tableOne) + +## See the categorical part only using $ operator +tableOne$CatTable +summary(tableOne$CatTable) + +## See the continuous part only using $ operator +tableOne$ContTable +summary(tableOne$ContTable) } \author{ Kazuki Yoshida, Justin Bohn diff --git a/man/summary.CatTable.Rd b/man/summary.CatTable.Rd index c01ba16..5fd33c7 100644 --- a/man/summary.CatTable.Rd +++ b/man/summary.CatTable.Rd @@ -16,10 +16,11 @@ It will print the results. } \description{ -This method shows all the data a CatTable class object has. -This includes the (optionally stratified) part with summary -statistics and p-values from the approximation method test -(chisq.test by default) and exact method test (fisher.test +This method shows all the data a \code{CatTable} class +object has. This includes the (optionally stratified) part +with summary statistics and , if available, p-values from +the approximation method test (\code{\link{chisq.test}} by +default) and exact method test (\code{\link{fisher.test}} by default). } \examples{ diff --git a/man/summary.ContTable.Rd b/man/summary.ContTable.Rd index 75a6710..c0cdfa2 100644 --- a/man/summary.ContTable.Rd +++ b/man/summary.ContTable.Rd @@ -18,9 +18,10 @@ It will print the results. \description{ This method shows all the data a \code{ContTable} class object has. This includes the (optionally stratified) part -with summary statistics and p-values from the normal -assupmtion-based test (oneway.test by default) and -nonparametric test (kruskal.test by default). +with summary statistics and , if available, p-values from +the normal assupmtion-based test (\code{\link{oneway.test}} +by default) and nonparametric test +(\code{\link{kruskal.test}} by default). } \examples{ ## Load diff --git a/man/summary.TableOne.Rd b/man/summary.TableOne.Rd index 2407d2f..bba3168 100644 --- a/man/summary.TableOne.Rd +++ b/man/summary.TableOne.Rd @@ -46,11 +46,6 @@ tableOne <- CreateTableOne(vars = c("time","status","age","ascites","hepato", ## Just typing the object name will invoke the print.TableOne method tableOne -## Specifying nonnormal variables will show the variables appropriately, -## and show nonparametric test p-values. Specify variables in the exact -## argument to obtain the exact test p-values. -print(tableOne, nonnormal = c("time"), exact = c("ascites")) - ## Use the summary.TableOne method for detailed summary summary(tableOne) } diff --git a/man/tableone-package.Rd b/man/tableone-package.Rd index 6055758..eea76e5 100644 --- a/man/tableone-package.Rd +++ b/man/tableone-package.Rd @@ -23,6 +23,10 @@ package is based on. Hadley Wickham for packaging advice and for creating tools this package was made with (roxygen2, devtools, testthat). +Members of Facebook Organization of R Users for Medical +Statistics in Japan (FORUMS-J) for testing pre-release +versions. + Developmental repository is on github. Your contributions are appreciated. @@ -58,7 +62,8 @@ tableOne ## Specifying nonnormal variables will show the variables appropriately, ## and show nonparametric test p-values. Specify variables in the exact ## argument to obtain the exact test p-values. -print(tableOne, nonnormal = c("time"), exact = c("ascites")) +print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), + exact = c("status","stage")) ## Use the summary.TableOne method for detailed summary summary(tableOne) @@ -70,6 +75,12 @@ summary(tableOne$CatTable) ## See the continuous part only using $ operator tableOne$ContTable summary(tableOne$ContTable) + +## If your work flow includes copying to Excel and Word when writing manuscripts, +## you may benefit from the quote argument. This will quote everything so that +## Excel does not mess up the cells. +print(tableOne, nonnormal = c("bili","chol","copper","alk.phos","trig"), + exact = c("status","stage"), quote = TRUE) } \author{ Kazuki Yoshida, Justin Bohn