union.wNames: Union with Name Preservation

View source: R/CodeAndRoll2.R

union.wNamesR Documentation

Union with Name Preservation

Description

Unites two character vectors while preserving names from the specified vector. Gives a warning if there are conflicts in names between x and y.

Usage

union.wNames(x, y, names = "x")

Arguments

x

A character vector.

y

A character vector.

names

Character. Specifies which vector's names to preserve in the output. "x" preserves x's names, "y" preserves y's names. Default: "x".

Value

A character vector with names preserved from the specified vector (x or y).

Examples

union.wNames(x =c(a = "gene1", b = "gene2", c = "gene3")
, y =c( c = "gene3", dada = "gene2", "gene4")
, names = "x")


vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.