c_net_annotate: Annotate a metanet

c_net_annotateR Documentation

Annotate a metanet

Description

Annotate a metanet

Usage

c_net_annotate(go, anno_tab, mode = "v", verbose = TRUE)

Arguments

go

metanet object

anno_tab

a dataframe using to annotate (mode v, e), or a list (mode n)

mode

"v" for vertex, "e" for edge, "n" for network

verbose

logical

Value

a annotated metanet object

See Also

Other manipulate: anno_edge(), anno_vertex(), c_net_filter(), c_net_save(), c_net_union(), get_e(), get_n(), get_v(), is_metanet()

Examples

data("c_net")
anno <- data.frame("name" = "s__Pelomonas_puraquae", new_atr = "new")
co_net_new <- c_net_annotate(co_net, anno, mode = "v")
get_v(co_net_new, c("name", "new_atr"))

anno <- data.frame("from" = "s__Pelomonas_puraquae", "to" = "s__un_g__Rhizobium", new_atr = "new")
co_net_new <- c_net_annotate(co_net, anno, mode = "e")
get_e(co_net_new, c("from", "to", "new_atr"))

co_net_new <- c_net_annotate(co_net, list(new_atr = "new"), mode = "n")
get_n(co_net_new)

MetaNet documentation built on May 29, 2024, 1:21 a.m.