merge_sdata: Merge sample/feature dt

View source: R/3.0_read_omics.R

merge_sdataR Documentation

Merge sample/feature dt

Description

Merge sample/feature dt

Usage

merge_sdata(
  object,
  dt,
  by.x = "sample_id",
  by.y = names(dt)[1],
  all.x = TRUE,
  verbose = TRUE
)

merge_sdt(
  object,
  dt,
  by.x = "sample_id",
  by.y = "sample_id",
  all.x = TRUE,
  verbose = TRUE
)

merge_fdata(
  object,
  dt,
  by.x = "feature_id",
  by.y = names(dt)[1],
  all.x = TRUE,
  verbose = TRUE
)

merge_fdt(
  object,
  dt,
  by.x = "feature_id",
  by.y = "feature_id",
  all.x = TRUE,
  verbose = TRUE
)

Arguments

object

SummarizedExperiment

dt

data.frame, data.table, DataFrame

by.x

string : object mergevar

by.y

string : df mergevar

all.x

TRUE / FALSE : whether to keep samples / features without annotation

verbose

TRUE / FALSE : whether to msg

Value

SummarizedExperiment

Examples

file <- system.file('extdata/atkin.metabolon.xlsx', package = 'autonomics')
object <- read_metabolon(file)
sdt(object)
sdt(merge_sdt(object, data.table(sample_id = object$sample_id,
                                    number = seq_along(object$sample_id))))

bhagwataditya/importomics documentation built on Oct. 29, 2024, 3:19 p.m.