Description Usage Arguments Value Examples
Make layout changes in a tabplot-object, such as the order of columns, and color palettes.
1 2 3 4 5 6 7 8 9 |
tab |
tabplot-object |
select |
index vector of the desired columns (column names are not supported) |
select_string |
vector of names of the desired columns |
decreasing |
determines whether the dataset is sorted decreasingly ( |
pals |
list of color palettes. Each list item is on of the following:
If the list items are unnamed, they are applied to all selected categorical variables (recycled if necessary). The list items can be assigned to specific categorical variables, by naming them accordingly. |
colorNA |
color for missing values |
numPals |
name(s) of the palette(s) that is(are) used for numeric variables ("Blues", "Greys", or "Greens"). Recycled if necessary. |
tabplot-object
1 2 3 4 5 6 7 8 9 10 11 12 13 | # load diamonds dataset from ggplot2
require(ggplot2)
data(diamonds)
# assign tableplot as tabplot object
tab <- tableplot(diamonds)
# modify the tabplot object: reverse order of columns and customize palette
tab <- tableChange(tab, select_string=rev(names(diamonds)),
pals=list(clarity=gray(seq(0,1,length.out=8))))
# plot modified tabplot object
plot(tab)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.