Learn R Programming

celda (version 0.0.0.9000)

recodeClusterZ: Re-code cell cluster labels by provided mapping scheme

Description

This function will re-code _cell_ cluster labels based off of a mapping provided by the user, for all fields on a celda object involving cluster labels. e.g. if Z (cell cluster) values range from 1-4 and the user would like all 3's switched to 1's and vice versa, this function can be useful. NOTE: it is recommended that this function's results aren't used to overwrite the original celda model object provided, in the event of a mis-mapping.

Usage

recodeClusterZ(celda.mod, from, to)

Arguments

celda.mod

An object of class celda_C or celda_CG

from

A numeric vector of the "keys", corresponding to the "values" in the to parameter

to

A numeric vector of the "values"; what each corresponding number in "from" should be mapped to