correct | R Documentation |

Correct data by setting all latent factors to their median values and reversing the regression model

```
correct(
x,
data = "y",
cell_attr = x$cell_attr,
as_is = FALSE,
do_round = TRUE,
do_pos = TRUE,
scale_factor = NA,
verbosity = 2,
verbose = NULL,
show_progress = NULL
)
```

`x` |
A list that provides model parameters and optionally meta data; use output of vst function |

`data` |
The name of the entry in x that holds the data |

`cell_attr` |
Provide cell meta data holding latent data info |

`as_is` |
Use cell attributes as is and do not use the median; set to TRUE if you want to manually control the values of the latent factors; default is FALSE |

`do_round` |
Round the result to integers |

`do_pos` |
Set negative values in the result to zero |

`scale_factor` |
Replace all values of UMI in the regression model by this value. Default is NA which uses median of total UMI as the latent factor. |

`verbosity` |
An integer specifying whether to show only messages (1), messages and progress bars (2) or nothing (0) while the function is running; default is 2 |

`verbose` |
Deprecated; use verbosity instead |

`show_progress` |
Deprecated; use verbosity instead |

Corrected data as UMI counts

```
vst_out <- vst(pbmc, return_cell_attr = TRUE)
umi_corrected <- correct(vst_out)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.