View source: R/doCohortCharacteristics.R
doCohortCharacteristics | R Documentation |
Generate cohort characteristics
doCohortCharacteristics(
input.d,
marker.name,
marker.description,
var.names,
is.var.continuous,
var.descriptions,
marker.value.labels.tolower = TRUE,
show.missing = TRUE,
show.missing.continuous = TRUE,
do.droplevels = TRUE,
show.percent = "both",
stat.tests = NULL,
chisq.test.simulate.p.value = FALSE,
stat.test.column.header = "association/correlation test",
show.test.name = TRUE,
round.digits.p.value = 4,
num.boot = 1000,
missing.codes.highlight = NULL,
missing.codes = c("N/A", "", "Unk"),
decimal = 0,
caption = NA,
html.table.border = 0,
banded.rows = FALSE,
css.class.name.odd = "odd",
css.class.name.even = "even",
custom.marker.labels = NULL,
custom.total.label = NULL,
split.table = 200,
...
)
input.d |
The |
marker.name |
The variable that you want to split into different columns |
marker.description |
The description for the variable(s) to split |
var.names |
The variables that you want the statistics for |
is.var.continuous |
Vector of length equal to the length of var.names with 1 indicating a continuous variable and 0 otherwise (this should be inferred in the function) |
var.descriptions |
Vector of strings to describe the variables as they are to appear in the table |
marker.value.labels.tolower |
Indicator as to whether to put marker value labels to lower case |
show.missing |
an indicator to whether to show missing values |
show.missing.continuous |
if set to |
do.droplevels |
drop categories of unobserved levels set to |
show.percent |
defaults to "both" which shows both rows and columns other possible values: "column", "row". |
stat.tests |
statistical test to perform. |
chisq.test.simulate.p.value |
Whether to simulate p-value for chi-square test. this parameter is ignored if chi-square is not used. Default value=FALSE |
stat.test.column.header |
The name to show on the header defaults to "association/correlation test" |
show.test.name |
logical; if |
round.digits.p.value |
The number of digits to round the P values |
num.boot |
the number of bootstrap samples for any bootstrap method that may be used |
missing.codes.highlight |
default to |
missing.codes |
a vector to indicate how missing values are coded,
default is |
decimal |
number of decimal places to show for aggregate numbers such as proportions or averages; default to 0 |
caption |
caption to use for the Table |
html.table.border |
the border type to use for html tables |
banded.rows |
If |
css.class.name.odd |
Used to set the row colour for odd rows |
css.class.name.even |
Used to set the row colour for even rows |
custom.marker.labels |
labels of marker to show; default |
custom.total.label |
label of the "Total" column; default |
split.table |
number of chars per row before table is split. |
... |
additional arguments to |
A table with statistics reported for multiple variables, such as mean, median, and range for continuous variables and proportions and percentages for categorical variables. Relevant association and correlation tests are performed as well.
Aline Talhouk
dcc <- doCohortCharacteristics( input.d = mtcars, marker.name = "cyl",
marker.description = "cylinders", var.names = c("disp", "hp"),
var.descriptions = c("displacement", "horsepower"), is.var.continuous =
c(TRUE, TRUE), caption = "Some mtcars summaries")
htmlTable::htmlTable(dcc$result.table.html)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.