View source: R/createOmics_JoinPhenoAssay.R
JoinPhenoAssay | R Documentation |
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.
JoinPhenoAssay(pheno_df, assay_df)
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 |
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.
A list of three elements:
assay
: A data frame with the rows from assay_df
which are contained in pheno_df
, ordered by their position in
pheno_df
.
response
: A data frame with the rows from
pheno_df
which are contained in assay_df
.
sampleID
: A vector of the sample IDs shared by both data
frames, ordered by their position in pheno_df
.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.