nonmissing_per_group: Computes the Number of Non-Missing Data Points by Group

Description Usage Arguments Value Author(s) Examples

Description

This function computes the number of non-missing observations for samples, based on a group designation, for every peptide in the dataset

Usage

1
2
nonmissing_per_group(omicsData = NULL, e_data = NULL, groupDF = NULL,
  cname_id = NULL, samp_id = NULL)

Arguments

omicsData

an optional object of one of the classes "pepData", "proData", "metabData", or "lipidData", usually created by as.pepData, as.proData, as.metabData, or lipidData, respectively. Either omicsData or all of e_data, groupDF, cname_id, and samp_id must be provided.

e_data

an optional a p \times n + 1 data.frame of expression data, where p is the number of lipids observed and n is the number of samples. Each row corresponds to data for each lipid. One column specifying a unique identifier for each lipid (row) must be present. Not required if omicsData is provided.

groupDF

data.frame created by group_designation with columns for the sample identifier and the designated group. Not required if omicsData is provided.

cname_id

character string specifying the name of the column containing the biomolecule identifiers in e_data and e_meta (if applicable). Not required if omicsData is provided.

samp_id

character string specifying the name of the column containing the sample identifiers in groupDF. Not required if omicsData is provided.

Value

a list of length two. The first element giving the total number of possible samples for each group. The second element giving a data.frame with the first column giving the peptide and the second through kth columns giving the number of non-missing observations for each of the k groups.

Author(s)

Lisa Bramer, Kelly Stratton

Examples

1
2
3
4
5
6
7
dontrun{
library(pmartRdata)
data(pep_object)
pep_object2 <- group_designation(omicsData = pep_object, main_effects = "Condition")
nonmissing_result <- nonmissing_per_group(omicsData = pep_object2)
nonmissing_result <- nonmissing_per_group(e_data = pep_object2$e_data, groupDF = attr(pep_object2, "group_DF"), cname_id = attr(pep_object2, "cnames")$edata_cname, samp_id = attr(pep_object2, "cnames")$fdata_cname)
}

pmartR/pmartRmems documentation built on May 29, 2019, 4:52 p.m.