Title: | Table 1 Heatmap |
---|---|
Description: | Table 1 is the classical way to describe the patients in a clinical study. The amount of splits in the data in such a table is limited. Table1Heatmap draws a heatmap of all crosstables that can be generated with the data. Users can choose between showing the actual crosstables or direction of effect of associations, and highlight associations by number of patients or p-values. v1.2 - fixed "missing "no visible global function definition for .." |
Authors: | Philip C Schouten |
Maintainer: | Philip C Schouten <[email protected]> |
License: | LGPL-3 |
Version: | 1.2 |
Built: | 2025-02-28 05:17:06 UTC |
Source: | https://github.com/cran/Table1Heatmap |
Plot a heatmap of table 1, either by plotting p values, n of patients colored by p-values or n of patients colored by percentage of total patients
plotTable1Heatmap(factorList, method = c("AssociationByP", "CrosstableByP", "CrosstableByN")[1], drawRaster = NULL, ...)
plotTable1Heatmap(factorList, method = c("AssociationByP", "CrosstableByP", "CrosstableByN")[1], drawRaster = NULL, ...)
factorList |
named list with clinical variables coded as factors |
method |
'AssociationByP' : draw a heatmap with p-values of the association between parameters and a direction of effect if a Fisher Exact test was performed. 'CrosstableByP' : draw a heatmap with p-values of the association between parameters and show the crosstables 'CrosstableByN' : draw a heatmap with percentage of patients in the cell of a crosstable and show the crosstables |
drawRaster |
draw horizontal and vertical lines marking characteristics |
... |
plotting parameters for image |
lst <- list(a=sample(c(TRUE,FALSE), 10, replace=TRUE), b=sample(c(TRUE,FALSE), 10, replace=TRUE), c=sample(c(TRUE,FALSE), 10, replace=TRUE)) lst <- lapply(lst, as.factor) dev.new(height=10, width=10) plotTable1Heatmap(factorList=lst, method='AssociationByP', drawRaster=TRUE) plotTable1Heatmap(factorList=lst, method='CrosstableByP', drawRaster=TRUE) plotTable1Heatmap(factorList=lst, method='CrosstableByN', drawRaster=TRUE)
lst <- list(a=sample(c(TRUE,FALSE), 10, replace=TRUE), b=sample(c(TRUE,FALSE), 10, replace=TRUE), c=sample(c(TRUE,FALSE), 10, replace=TRUE)) lst <- lapply(lst, as.factor) dev.new(height=10, width=10) plotTable1Heatmap(factorList=lst, method='AssociationByP', drawRaster=TRUE) plotTable1Heatmap(factorList=lst, method='CrosstableByP', drawRaster=TRUE) plotTable1Heatmap(factorList=lst, method='CrosstableByN', drawRaster=TRUE)