Description Usage Arguments Examples
This function will generate a common statistical summary table after you select a dataset, select targeting variables, select grouping variables, select whether you want number, mean, standard deviation and quantile.
1 2 |
dataset |
Select the dataset you are working on |
variable |
Select the variables you want to analyze |
grp.by |
Select grouping variables |
n |
Whether the number of non-missing/null values will be displayed |
mu |
Whether the value of mean will be calculated |
s |
Whether the value of standard deviation will be calculated |
q |
A list of quantiles |
q.type |
Quantile type |
round.N |
Round digits |
1 2 3 4 5 6 7 8 9 10 | library(data.table)
library(ifaR.handtool)
dt<-data.table(grp=rep(c("Control", "Treatment"), each=50),
time=rep(c("Base", "Follow", "Base", "Follow"), each=25),
age=rnorm(100, mean=65, sd=10),bmi=rnorm(100, mean=28, sd=4),
leanmass=rnorm(100, mean=65, sd=6))
dt$leanmass[95]<-NA
sumtbl(dt, c("age", "bmi"), c("grp"), n=F, mu=T, s=T, q=c(.25, .5, .75))
sumtbl(dt, c("age", "bmi", "leanmass"), c("grp", "time"), n=T, mu=T, s=T, q=c(.25, .5, .75))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.