View source: R/plot.mr.sig.cell.R
plot.mr.sig.cell | R Documentation |
This function plots the results coming from mr.sig.cell
## S3 method for class 'mr.sig.cell'
plot(
x,
alpha.1 = 0.05,
alpha.2 = 0,
choice = "percent.derived.cont",
col.greater.1 = "green3",
col.lower.1 = "orangered",
col.greater.2 = "lightgreen",
col.lower.2 = "lightsalmon",
...
)
x |
A list returned by |
alpha.1 |
The alpha risk to consider the tests as significant |
alpha.2 |
The alpha risk to consider the tests as showing a trend. If trends are not to be considered, alpha.2 can be set to 0 (Default) |
choice |
Which table from res should be plotted? Default is percent.derived.cont |
col.greater.1 |
The color used to highlight significant positive associations |
col.lower.1 |
The color used to highlight significant negative associations |
col.greater.2 |
The color used to highlight positive associations showing a trend |
col.lower.2 |
The color used to highlight negative associations showing a trend |
... |
further arguments passed to or from other methods |
A table with cells highlighted
nb.obs=200
nb.response=5
nb.category=5
vec.category=paste("C",1:nb.category,sep="")
right=matrix(rbinom(nb.response*nb.obs,1,0.25),nb.obs,nb.response)
category=sample(vec.category,nb.obs,replace = TRUE)
dset=cbind.data.frame(category,right)
dset$category=as.factor(dset$category)
res=mr.sig.cell(dset)
plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.