Description Usage Arguments Details Author(s) Examples
View source: R/reportfunctions.R
not done yet. But soon.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
row |
vector containing factors for row |
col |
vector containing factors for columns |
data |
the dataframe to get the values from |
uniquecounts |
only unique counts |
caption |
caption of table |
percs |
if TRUE percentage of row or column are displayed (default=TRUE) |
total |
sum of columns and rows (default= TRUE) |
dec |
decimal points (default =1) |
split.tables |
where to split wide tables to separate tables. The default value is 300 characters |
margin |
index, or vector of indices to generate margin for |
table.continues |
string (default: 'Tabelle wird fortgesetzt') passed to pandoc.table to be used as caption for long (split) without a use defined caption |
sortcounts |
if TRUE rows will be sorted descendent by counts |
split.cells |
where to split cells' text with line breaks. Default to 30, to disable set to Inf. Can be also supplied as a vector, for each cell separately (if length(split.cells) == number of columns + 1, then first value in split.cells if for row names, and others are for columns). Supports relative (percentage) parameters in combination with split.tables. |
ucol.name |
title of counted values default is "Patienten n/(%)" |
Creates a Crosstable in Markdown format with 2 dimensions and one variable for a unique counting
Stefan Bartels, email@biobits.eu
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
PatientCohort<-c("CohortA","CohortA","CohortA","CohortB","CohortB","CohortB",
"CohortB","CohortB","CohortB","CohortC","CohortC","CohortC","CohortC")
PatientClass<-c("ClassA","ClassB","ClassB","ClassC","ClassA","ClassC",
"ClassA","ClassB","ClassA","ClassC","ClassA","ClassA","ClassA")
df<-as.data.frame(cbind(PatientCohort,PatientClass))
tab<-bbcounttab(row="PatientCohort",col="PatientClass",data=df,total=T,perc=T
,dec=2,ucol.name="Classes")
tab
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.