getSpanningSet: Split Data into Bins

Description Usage Arguments Author(s) Examples

Description

Splits data into bins that span the range of intensities

Usage

1
getSpanningSet(snm.obj)

Arguments

snm.obj

An object of class snm

Author(s)

Brig Mecham <brig.mecham@sagebase.org> and John D. Storey <jstorey@princeton.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(snm.obj) {
  m <- rowMeans(snm.obj$M[snm.obj$nulls,])
  steps <- seq(quantile(snm.obj$M[snm.obj$nulls,],0.001),
               quantile(snm.obj$M[snm.obj$nulls,],0.999), length.out=snm.obj$nbins)
  th <- sapply(m, function(x) { 
    sum(x <= steps)
  }) 
  bins <- split(snm.obj$nulls, th)
  bins
  }

Sage-Bionetworks/snm documentation built on May 9, 2019, 12:14 p.m.