library(parallelPlot)
factor
type)parallelPlot(iris)
‘species’ column is of factor type and has box representation for its categories.
refColumnDim
argument (referenced column is
categorical)parallelPlot(iris, refColumnDim = "Species")
Each trace has a color depending of its ‘species’ value.
categoricalCS
argumentparallelPlot(iris, refColumnDim = "Species", categoricalCS = "Set1")
Colors used for categories are not the same as previously (supported values: Category10, Accent, Dark2, Paired, Set1).
refColumnDim
argument (referenced column is
continuous)parallelPlot(iris, refColumnDim = "Sepal.Length")
Each trace has a color depending of its ‘Sepal.Length’ value.
continuousCS
argumentparallelPlot(iris, refColumnDim = "Sepal.Length", continuousCS = "YlOrRd")
Colors used for traces are not the same as previously (supported values: Blues, RdBu, YlGnBu, YlOrRd, Reds).
factor
type)parallelPlot(mtcars)
Several columns are of numerical type but should be of factor type (for example ‘cyl’).
categorical
argument<- list(NULL, c(4, 6, 8), NULL, NULL, NULL, NULL, NULL, c(0, 1), c(0, 1), 3:5, 1:8)
categorical parallelPlot(mtcars, categorical = categorical, refColumnDim = "cyl")
‘cyl’ and four last columns have a box representation for its categories.
inputColumns
argument<- list(NULL, c(4, 6, 8), NULL, NULL, NULL, NULL, NULL, c(0, 1), c(0, 1), 3:5, 1:8)
categorical <- c(FALSE, TRUE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, TRUE)
inputColumns parallelPlot(mtcars, categorical = categorical, inputColumns = inputColumns, refColumnDim = "cyl")
The column name is blue for outputs and green for inputs (in shiny mode, inputs can be edited).
histoVisibility
argument<- rep(TRUE, ncol(iris))
histoVisibility parallelPlot(iris, histoVisibility = histoVisibility)
An histogram is displayed for each column.
invertedAxes
argument<- rep(FALSE, ncol(iris))
invertedAxes 2] <- TRUE
invertedAxes[parallelPlot(iris, invertedAxes = invertedAxes)
Axe of second column is inverted.
cutoffs
argument<- rep(TRUE, ncol(iris))
histoVisibility <- list(list(c(6, 7)), NULL, NULL, NULL, c("virginica", "setosa"))
cutoffs parallelPlot(iris, histoVisibility = histoVisibility, cutoffs = cutoffs)
Traces which are not kept by cutoffs are greyed; an histogram is displayed considering only kept traces.
refRowIndex
argumentparallelPlot(iris, refRowIndex = 1)
Axes are shifted vertically in such a way that first trace of the dataset looks horizontal.
rotateTitle
argumentparallelPlot(iris, refColumnDim = "Species", rotateTitle = TRUE)
Column names are rotated (can be useful for long column names).
columnLabels
argument<- gsub("\\.", "<br>", colnames(iris))
columnLabels parallelPlot(iris, refColumnDim = "Species", columnLabels = columnLabels)
Given names are displayed in place of column names found in dataset;
<br>
is used to insert line breaks.
cssRules
argumentparallelPlot(iris, cssRules = list(
"svg" = "background: white", # Set background of plot to white
".tick text" = c("fill: red", "font-size: 1.8em") # Set text of axes ticks red and greater
))
Apply CSS to the plot. CSS is a simple way to describe how elements on a web page should be displayed (position, colour, size, etc.). You can learn the basics at W3Schools. You can learn how to examine and edit css at MDN Web Docs for Firexox or Chrome devtools for Chrome.
sliderPosition
argumentparallelPlot(iris, sliderPosition = list(
dimCount = 3, # Number of columns to show
startingDimIndex = 2 # Index of first shown column
))
Set initial position of slider, specifying which columns interval is visible.
controlWidgets
argumentparallelPlot(iris, refColumnDim = "Species", controlWidgets = TRUE)
Some widgets are available to control the plot.