Skip to contents

This function generates a data.frame containing the summed centrality values at a specified taxonomic level.

Usage

phyl_ctr_df (ctr_df, layer_names, n_layers)

Arguments

ctr_df

Data.frame pre-processed with ctr_df function.

layer_names

Name of the layers.

n_layers

Number of layers.

Value

A data.frame with one column per layer with their centrality value.

Examples


data("ctr_df_dstool")

# Create a vector with layers' names
n <- c("sample A", "sample B")

phyl_ctr_df (ctr_df_dstool, layer_names = n, n_layers = 2)
#>    sample A sample B                   Taxon    Colors
#> 1         1        0             Nitrospirae #26828EFF
#> 4         0        4  Acidobacteria (phylum) #28AE80FF
#> 6         2       16          Proteobacteria #34608DFF
#> 8         2        9 Actinobacteria (phylum) #51C56AFF
#> 9         2        0              Firmicutes #3DBC74FF
#> 15        0        1          Planctomycetes #25AC82FF
#> 16        1        0         Armatimonadetes #1E9B8AFF
#> 17        0        4         Verrucomicrobia #277E8EFF