Creates 'Table 1', i.e., description of baseline patient characteristics, which is essential in every medical research. Supports both continuous and categorical variables, as well as p-values and standardized mean differences. Weighted data are supported via the 'survey' package. See 'github' for a screen cast.
BUG FIXES
Fix a missing value handling issue (via @chipmanj). Closes issue #26.
mean (sd) was changed to mean (SD) to be consistent with median [IQR].
NEW FEATURES
Add a helper for exporting TableOne objects to Markdown (via @malcolmbarrett). Currently, this is very basic. We hope to extend its functionalities.
README.md now lists similar or complementary projects.
BUG FIXES
BUG FIXES
BUG FIXES
NEW FEATURES
The "varLabels" option for the print.TableOne method was added. When TRUE, instead of printing the variable names, their corresponding variable labels are used. Variable labels must be stored in the data frame to be used via labelled::var_label function. This option is also available in ExtractSmd function.
The "dropEqual" option for the print methods was implemented. If TRUE, the level description for two-level variables such as " = 1" and " = TRUE" are not shown. This can obscure what level is being shown depending on the variable naming scheme, thus, should only be used after the initial results were checked for correctness.
BUG FIXES
BUG FIXES
BUG FIXES
Fix alignment issue with the Missing column. Note currently the percentage is shown with 1 decimal and this is hard-coded.
Change vignetteBuilder to knitr to form the index correctly.
Single-quote package names in DESCRIPTION.
NEW FEATURES
The "missing" option for the print methods was implemented. If TRUE, a column called "Missing" is added as the rightmost column of the formatted table. This represents percentage of missing observation in each variable. Please note this is the percentage with respect to the unweighted raw observations even in weighted tables.
The "padColnames" option was added the print.TableOne method. If TRUE, the column names of the formatted table become space-padded to center them.
BUG FIXES
The explanation for the "factorVars" argument for the functions CreateTableOne and svyCreateTableOne were changed for clarity. When factor variables are included in the argument, they are releveled to exlude empty levels. This was not clearly documented in the previous documentation. Thanks @eribul.
svyrep.design objects (survey design objects with replicate weights) are allowed for the data argument in svyTableOne. This is considered experimental. Thanks @przemo.
BUG FIXES
NEW FEATURE
BUG FIXES
BUG FIXES
BUG FIXES
Solve problems with unit testing on the sparc architecture without extended-precision arithmetic support.
Fix title for second vignette.
NEW FEATURES
Weighted data are now supported via the survey package. svydesign() should be used to create a survey design object, and this object should be used for svyCreateTableOne() instead of a data frame. Other options are essentially the same. All results will be weighted results.
Standardized mean differences are calculated. print() methods include smd option, which defaults to FALSE for backward compatibility. If TRUE, SMD is shown on the right side of the table. To suppress p-values, use test = FALSE option. summary() methods also print SMDs. If there are more than two strata, all possible pairwise contrasts are shown along with the average SMD across all contrats. In this case, print methods only prints the average SMD for brevity. For categorical variables Yang and Dalton's suggested method (A unified approach to measuring the effect size between two groups using SAS. SAS Paper 335-2012) is used. SMDs for weighted data are experimental.
ExtractSmd() function can be used to extract SMD values as a numeric matrix, which then can be used for plotting, etc.
An new RMarkdown vignette explains the use of standardized mean differences.
The includeNA option for CreateTableOne() and svyCreateTableOne() make NA's in factors treated as a regular level.
ShowRegTable() now has ciFun option, which allows use of the confint.default function if calculation is too slow for glm results.
print.TableOne() aligns the sample size with other summaries.
OTHER CHANGES
ShowRegTable() uses coef to refer to coefficients.
Unit tests were extended to cover more functions.
CreateTableOne() was refactored to avoid redundant calculation.
New dependencies: survey, MASS, and zoo
BUG FIXES
DOCUMENTATION
BUG FIXES
The testing of 1 x m table was problematic when a categorical variable only have one level. chisq.test() returns Chi-squared test for given probabilities (test for strata imbalance) in such cases. In this version, testing a 1 x m table always return NA, as test for a cross table is not defined in this context.
Special thanks to Atsushi Shiraishi for reporting this issues.
Unit testing with the testthat package was added for some functions. Thus, the testthat package was added as a suggested package.
BUG FIXES
The algorithm CreateCatTable used to detect variables to convert to factos had a bug. CreateCatTable was effectively (re-)converting all variables to factors, which deleted empty levels from factors and ordered factors.
Special thanks to Atsushi Shiraishi for reporting this issues.
NEW FEATURES
NEW FEATURES
NEW FEATURES
BUG FIXES
Fixed a problem with space insertion when empty strata are present.
Thanks Joris Muller for bug reports and code suggestions for the following.
Added more robust class assessment in CreateTableOne and CreateCatTable, which now handles ordered factors correctly. CreateTableOne also drops Surv object for safety.
"Dropped due to unsupported class" message has been fixed to show variable names with spaces in between.
BUG FIXES
Added the Create* functions handling of all NA/NaN variables. These invalid variables are examined at the beginning and dropped with warning for safety.
For the strata argument, variables with only one level is dropped with warning because these are meaningless, and caused data handling problems.
BUG FIXES
BUG FIXES
BUG FIXES
NAMESPACE now includes import(e1071) and import(gmodels).
DESCRIPTION now includes Imports e1071, gmodels and Suggests survival, instead of Depends...
NEW FEATURES
CreateTableOne has a new factorVars argument, a character vector specifying numerically coded variables that should be treated as factors.
The print method for the TableOne/CatTable class object has a new minMax argument, a logical value specifying whether to show median [min, max] instead of median [IQR] for nonnormal variables
The print method for the TableOne/CatTable class object has a new cramVars argument, a character vector to specify which 2-level factors to should have both levels presented in one row.
BUG FIXES
BUG FIXES
NEW FEATURES
CreateTableOne and related print/summary methods were added.
CreateTableOne can crate a table with both categorical and continuous variables.
The print method can suppress printing by printToggle option.
BUG FIXES
BUG FIXES
Fixed incorrect specification of S3 method export.
To make an object an S3 method and export it both at_S3method and at_export tags are needed in the Roxygen part of the code.
Passed all the default tests by R CMD check file.tar.gz
BUG FIXES
This version is to better conform to the CRAN standards.
Documents are now included in
FIRST DEVELOPMENTAL VERSION
This is the first developmental version to be made public.
tableone makes creation of "Table 1", description of baseline characteristics common in medical research papers easy.
################################################################################