Learn R Programming

scMappR (version 1.0.11)

tochr: To Character.

Description

This function checks if your vector is not a character and if not, will convert it to a character.

Usage

tochr(x)

Value

tochr Returns a character vector.

Arguments

x

A character, factor or numeric vector.

Examples

Run this code

 
 # vector of factors
 fact <- factor(c("a", "b", "c", "d"))
 # convert to character
 char <- tochr(x = fact)
 

Run the code above in your browser using DataLab