JoinPhenoAssay: Merge Phenotype and Assay Data by First Column (Sample ID)

Description Usage Arguments Details Value Examples

View source: R/createOmics_JoinPhenoAssay.R

Description

Match the records from the phenotype data to the values in the assay data by sample ID. Return rows from each data frame with matches in both data frames. The sample ID must be the first column in both data frames.

Usage

1
JoinPhenoAssay(pheno_df, assay_df)

Arguments

pheno_df

Phenotype data frame with the sample IDs in the first column

assay_df

Assay data frame with the sample IDs in the first column

Details

Don't use this function. This is simply a wrapper around the merge function with extra checks for the class of the ID column. If you want to merge your two data frames by sample ID, you should use the inner_join function from the dplyr package instead. It's easier. See https://dplyr.tidyverse.org/reference/join.html.

Value

A list of three elements:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  # DO NOT CALL THIS FUNCTIONS DIRECTLY. USE CreateOmics() INSTEAD.

## Not run: 
 data("colonSurv_df")
 JoinPhenoAssay(
   pheno_df = colonSurv_df[, 1:3],
   assay_df = colonSurv_df[, -(2:3)]
 )

## End(Not run)

pathwayPCA documentation built on Dec. 15, 2020, 6:14 p.m.