Learn R Programming

tcR (version 2.2.4)

set.people.vector: Set and get attributes of a mutation network related to source people.

Description

Set vertice attributes 'people' and 'npeople' for every vertex in the given graph. Attribute 'people' is a binary string indicating in which repertoire sequence are found. Attribute 'npeople' is a integer indicating number of repertoires, in which this sequence has been found.

Usage

set.people.vector(.G, .shared.rep)

get.people.names(.G, .V = V(.G), .paste = T)

Arguments

.G

Mutation network.

.shared.rep

Shared repertoire.

.V

Indices of vertices.

.paste

If TRUE than concatenate people names to one string, else get a character vector of names.

Value

New graph with 'people' and 'npeople' vertex attributes or character vector of length .V or list of length .V.

Examples

Run this code
# NOT RUN {
data(twb)
twb.shared <- shared.repertoire(twb)
G <- mutation.network(twb.shared)
get.people.names(G, 300, T)  # "Subj.A|Subj.B"
get.people.names(G, 300, F)  # list(c("Subj.A", "Subj.B"))
# }

Run the code above in your browser using DataLab