R/CheckDatabase.R

Defines functions CheckDatabase

Documented in CheckDatabase

#' Return number of databases reporting RNA editing event
#'
#' \code{CheckDatabase} returns the number of databases reporting an RNA editing
#' event
#'
#' @param ... one or more vectors giving database annotations for each RNA
#'   editing event
#' @return A numeric vector with database counts
#' @examples
#' \dontrun{
#' db <- CheckDatabase(
#' RNAEdDataQCed$Annotation$RADAR_gid,
#' RNAEdDataQCed$Annotation$DARNED_gid,
#' RNAEdDataQCed$Annotation$REDIportal_gid
#' )
#' table(db)
#' }
#' @export

CheckDatabase <- function(...){
  result <- lapply(list(...), function(x){ifelse(is.na(x), 0,1)})
  Reduce(`+`, result)
}
okg3/RNAEditingAnalysisTools documentation built on April 2, 2020, 5:04 a.m.