Ch28-nna: A helper function- turns a missing column into 'NA's inside...

Description Usage Arguments Value Author(s) Examples

Description

A helper function– turns a missing column into 'NA's inside of a with statement. Included at the user level because its useful in setting up batch jobs, especially since the 'pwrFDR' return argument list varies depending on the manner called.

Usage

1
  nna(x)

Arguments

x

A named numeric vector component of a data frame which may or may not be present.

Value

Either the values in the component x of the data.frame or NA\'s of equal length

Author(s)

Grant Izmirlian <izmirlian at nih dot gov>

Examples

1
2
3
4
5
6
7
8
9
  sim.1 <- pwrFDR(effect.size=0.8, n.sample=60, lambda=0.90, r.1=0.05, N.tests=450, alpha=0.15,
                  method="sim", FDP.control.method="BHCLT")

  sim.2 <- pwrFDR(effect.size=0.8, n.sample=60, lambda=0.90, r.1=0.05, N.tests=450, alpha=0.15,
                  method="sim", FDP.control.method="both", control=list(sim.level=2))

  with(detail(sim.1)$reps, cbind(R.st/100, nna(R.R)/450))

  with(detail(sim.2)$reps, cbind(R.st/100, nna(R.R)/450))

pwrFDR documentation built on May 12, 2021, 5:07 p.m.

Related to Ch28-nna in pwrFDR...