Plot continuous values belonging to class labels. The values are plotted relative to each other in a gradient from a spectrum between two colors. User has the option to perform an association test and output p-value and a table summarizing median values and range.

panelet_continuous(pp,pp.col,gr, var.n="var.n",NA.flag=TRUE,
NA.col="grey", get.pval=FALSE, border=FALSE, border.col="black", ...)

Arguments

pp

required. vector. A vector of continuous values of interest

pp.col

required. vector. A vector of colors out of which a spectrum of relative values will be plotted to make a gradient of continuous values in pp . Order the spectrum of vectors as (low,high)

gr

required. vector. Class labels as passed to panelet_group. If NULL assumes no grouping, and outputs median and range if get.pval=TRUE

var.n

character. A character specifying the name of the variable. Set to blank "" if you want to omit printing any text. See cex

NA.flag

logical, default is FALSE. see get.colvector for details

NA.col

default is "grey". see get.colvector for details

get.pval

logical, default is FALSE. Perform non parametric association tests to test for association between the group variable and the continuous variable of interest. If TRUE a table summarizing median value and range in each class is returned as well.

border

logical, default is FALSE. Add a border outside panelet and demarcating group boundaries

border.col

default is "black", if border=TRUE, you can specify the color of the border to be plotted. Plots outside the panelet and class boundaries

...

pass optional arguments here

Details

... can pass other parameters. Use it for controlling names and colors of panelets via cex, col. border line type and thickness can be controlled via lty and lwd respectively.

A colored panelet of continuous values is plotted as a gradient with values relative to each other. Make sure the variable is ordered according to the group labels in panelet_group.

Value

A colored panelet of categorical values is plotted.

tab

if get.pval=TRUE, returns a table summarizing the median value and range with a p-value from Kruskal Wallis Test

See also

makepanel

Examples

#adjust margins and number of panelet values par(mfrow=c(6,1),mar=c(0,8,0,14)) #sort the entire data frame according to the group solution you are interested in mtcars.sort = mtcars[order(mtcars$cyl),] #plot group tt=panelet_group(gr=mtcars.sort$cyl, gr.col=c("red","blue","green"), gr.name="cyl",cex=1, border=TRUE, legend=FALSE) #plot variable mpg tt =panelet_continuous(mtcars.sort$mpg, pp.col=c("white","darkred"), gr=mtcars.sort$cyl,var.n="mpg",NA.flag=FALSE, get.pval=TRUE, border=TRUE)
#> Performing Kruskal-Wallis test
## Performing Kruskal-Wallis test