R/maSearch.R

Defines functions findID

Documented in findID

###################################################################
## Examples
## library(marrayInput)
## data(swirl)
## findID("fb24a09", swirl, ID="ID")
## findID("geno1", swirl)
###################################################################

findID <-
  function(text,
           Gnames=gnames,
           ID = "Name")
{
  switch(data.class(Gnames),
         ExpressionSet = G <- phenoData(Gnames),
         marrayRaw = G <- maGeneTable(Gnames),
         marrayNorm = G <-maGeneTable(Gnames),
         marrayInfo = G <- maInfo(Gnames),
         G <- Gnames
         )
  ind <- grep(ID, colnames(G))
  y <- as.vector(G[,ind])
  x <- grep(text, y)
  return(x)
}

Try the marray package in your browser

Any scripts or data that you put into this service are public.

marray documentation built on Nov. 8, 2020, 6:46 p.m.