get_other_labels: Get other annotations (e.g. sample number) for hosts in data...

Description Usage Arguments Details Value Examples

View source: R/posterior_analyses.R

Description

Get other annotations (e.g. sample number) for hosts in data set

Usage

1
2
3
4
5
6
get_other_labels(
  centroids,
  tax_level = "ASV",
  annotation = "group",
  MAP = FALSE
)

Arguments

centroids

data.frame of per-host centroids from posterior embedding

tax_level

taxonomic level at which to agglomerate data

annotation

label to assign (e.g. individual)

MAP

use MAP estimate model output instead of full posterior output

Details

Output is the centroids data.frame appended with the desired annotation. Available annotations are: group, matgroup, samplenumber, sampledensity, mom, dad, momrank, drought, largegroup, momdied, competingsib, earlyadversity, birthrate_all, birthrate_surviving, alphadiv, wetproportion

Value

data.frame

Examples

1
2
centroids <- readRDS(file.path("output","plots","genus","Sigma_ordination_centroids.rds"))
labelled_centoids <- get_other_labels(centroids, tax_level="ASV", annotation="group", MAP=FALSE)

kimberlyroche/ROL documentation built on Dec. 10, 2020, 2:18 a.m.