inner_join_cdisc: Inner Joining a Genes with a CDISC Data Set

View source: R/join_cdisc.R

inner_join_cdiscR Documentation

Inner Joining a Genes with a CDISC Data Set

Description

[Experimental]

This is a useful function when trying to join genetic with CDISC data sets.

Usage

inner_join_cdisc(
  gene_data,
  cdisc_data,
  patient_key = "USUBJID",
  additional_keys = character()
)

Arguments

gene_data

(data.frame or DataFrame)
genetic data.

cdisc_data

(data.frame)
CDISC data (typically patient level data).

patient_key

(string)
patient identifier.

additional_keys

(character)
potential additional keys for the two data sets.

Value

A data.frame which contains columns from both data sets merged by the keys.

Note

Columns which are contained in both data sets but are not specified as keys are taken from gene_data and not from cdisc_data.

Examples

gene_data <- col_data_with_genes(hermes_data, "counts", gene_spec("GeneID:1820"))
cdisc_data <- data.frame(
  USUBJID = head(gene_data$USUBJID, 10),
  extra = 1:10
)
result <- inner_join_cdisc(gene_data, cdisc_data)
result

insightsengineering/hermes documentation built on Aug. 23, 2024, 11:28 p.m.