dr_extract: Extracting the internal tbl_df attribute of tibble.

View source: R/method-dr-tibble.R

dr_extractR Documentation

Extracting the internal tbl_df attribute of tibble.

Description

Extracting the internal tbl_df attribute of tibble.

Usage

dr_extract(name, .f = NULL)

Arguments

name

character the name of internal tbl_df attribute.

.f

a function (if any, default is NULL) that pre-operate the data

Value

tbl_df object

Author(s)

Shuangbin Xu

Examples

## Not run: 
library(vegan)
data(varespec, varechem)
mpse <- MPSE(assays=list(Abundance=t(varespec)), colData=varechem)
tbl <- 
mpse %>%
  mp_cal_nmds(.abundance=Abundance, action="add") %>%
  mp_envfit(.ord=NMDS, .env=colnames(varechem), action="only") 
tbl 
tbl %>% attributes %>% names
# This function is useful to extract the data to display with ggplot2
# you can also refer to the examples of mp_envfit.
dr_extract(name=NMDS_ENVFIT_tb)(tbl)
# add .f function 
dr_extract(name=NMDS_ENVFIT_tb, 
           .f=td_filter(pvals<=0.05 & label!="Humdepth"))(tbl)

## End(Not run)

xiangpin/MicrobiotaProcess documentation built on Nov. 12, 2024, 2:05 p.m.