tableChange: Change a tabplot-object

Description Usage Arguments Value Examples

View source: R/tableChange.R

Description

Make layout changes in a tabplot-object, such as the order of columns, and color palettes.

Usage

1
2
tableChange(tab, select = NULL, select_string = tab$select,
  decreasing = NULL, pals = list(), colorNA = NULL, numPals = NULL)

Arguments

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 (TRUE) of increasingly (FALSE).

pals

list of color palettes. Each list item is on of the following:

  • a palette name in tablePalettes, optionally with the starting color between brackets.

  • a palette vector

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.

Value

tabplot-object

Examples

 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)

Example output

Loading required package: bit
Attaching package bit
package:bit (c) 2008-2012 Jens Oehlschlaegel (GPL-2)
creators: bit bitwhich
coercion: as.logical as.integer as.bit as.bitwhich which
operator: ! & | xor != ==
querying: print length any all min max range sum summary
bit access: length<- [ [<- [[ [[<-
for more help type ?bit

Attaching package: 'bit'

The following object is masked from 'package:base':

    xor

Loading required package: ff
Attaching package ff
- getOption("fftempdir")=="/work/tmp/tmp/Rtmpqn4C2i"

- getOption("ffextension")=="ff"

- getOption("ffdrop")==TRUE

- getOption("fffinonexit")==TRUE

- getOption("ffpagesize")==65536

- getOption("ffcaching")=="mmnoflush"  -- consider "ffeachflush" if your system stalls on large writes

- getOption("ffbatchbytes")==16777216 -- consider a different value for tuning your system

- getOption("ffmaxbytes")==536870912 -- consider a different value for tuning your system


Attaching package: 'ff'

The following objects are masked from 'package:bit':

    clone, clone.default, clone.list

The following objects are masked from 'package:utils':

    write.csv, write.csv2

The following objects are masked from 'package:base':

    is.factor, is.ordered

Loading required package: ffbase

Attaching package: 'ffbase'

The following objects are masked from 'package:ff':

    [.ff, [.ffdf, [<-.ff, [<-.ffdf

The following objects are masked from 'package:base':

    %in%, table

Loading required package: ggplot2

tabplot documentation built on Sept. 17, 2019, 5:04 p.m.