Table1 {lulab.utils} | R Documentation |
Table1
Description
Make Table1
Usage
Table1(df, ycol, xcol, xlabels, result_dir, verbose = TRUE)
Arguments
df |
a data.frame |
ycol |
a grouping variable |
xcol |
variables to be compared |
xlabels |
levels of ycol |
result_dir |
directory to save the result |
verbose |
logical, controlling the output |
Details
This function is used to make Table1 and return excel file.
Value
excel file
Author(s)
Zhen Lu
Examples
data("melanoma", package = "boot")
melanoma2 <- melanoma
# Factor the basic variables that
# we're interested in
melanoma2$status <-
factor(melanoma2$status,
levels=c(2,1,3),
labels=c("Alive", # Reference
"Melanoma death",
"Non-melanoma death"))
test= Table1(
df= melanoma2,
xcol= setdiff(names(melanoma2), "status"),
ycol= "status",
result_dir= tempdir()
)
[Package lulab.utils version 0.0.4 Index]