Simulate {dittoSeq} | R Documentation

## Simulates what a colorblind person would see for any dittoSeq plot!

### Description

Essentially a wrapper function for colorspace's deutan(), protan(), and tritan() functions. This function will output any dittoSeq plot as it might look to an individual with one of the common forms of colorblindness: deutanopia/deutanomaly, the most common, is when the cones mainly responsible for red vision are defective. Protanopia/protanomaly is when the cones mainly responsible for green vision are defective. In tritanopia/tritanomaly, the defective cones are responsible for blue vision. Note: there are more severe color deficiencies that are even more rare. Unfortunately, for these types of color vision deficiency, only non-color methods, like lettering or shapes, will do much to help.

### Usage

    Simulate(
      type = c("deutan", "protan", "tritan"),
      plot.function,
      ...,
      color.panel = dittoColors(),
      min.color = "#F0E442",
      max.color = "#0072B2"
    )

### Arguments

`type` | The type of colorblindness that you want to simulate for. Options: "deutan", "protan", "tritan". Anything else, and you will get an error.
`plot.function` | The plotting function that you want to use/simulate. not quoted. and make sure to remove the () that R will try to add.
`...` | other paramters that can be given to dittoSeq plotting functions, including color.panel, used in exactly the same way they are used for those functions. (contrary to the look of this documentation, color.panel will still default to dittoColors() when not provided.)
`color.panel, min.color, max.color` | The set of colors to be used.

### Value

Outputs a dittoSeq plot with the color.panel / min.color & max.color updated as it might look to a colorblind individual.

Note: Does not currently adjust dittoHeatmap.

### Author(s)

Daniel Bunis

### Examples

    example(importDittoBulk, echo = FALSE)
    Simulate("deutan", dittoDimPlot, object=myRNA, var="clustering", size = 2)
    Simulate("protan", dittoDimPlot, myRNA, "clustering", size = 2)
    Simulate("tritan", dittoDimPlot, myRNA, "clustering", size = 2)

[Package dittoSeq version 1.0.2 Index]