R/isUnitGroupCellMap.R

setMethodS3("isUnitGroupCellMap", "matrix", function(this, ...) {
  fields <- c("unit", "group", "cell")

  # Got the columns?
  if (!all(fields %in% colnames(this)))
    return(FALSE)

  # Are they numeric?
  if (!is.numeric(this))
    return(FALSE)

  TRUE
})


setMethodS3("isUnitGroupCellMap", "data.frame", function(this, ...) {
  fields <- c("unit", "group", "cell")

  # Got the columns?
  if (!all(fields %in% colnames(this)))
    return(FALSE)

  # Are they numeric?
  for (field in fields) {
    if (!is.numeric(this[[field]]))
      return(FALSE)
  }
  
  TRUE
})


setMethodS3("isUnitGroupCellMap", "default", function(this, ...) {
  FALSE
})

Try the aroma.affymetrix package in your browser

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

aroma.affymetrix documentation built on July 18, 2022, 5:07 p.m.