Defines functions validate_association

Documented in validate_association

validate_association <-
function(entity.attribute, message=TRUE){
  ### should have 2 columns
  err.msg <- 'The entity attribute structure must have only 2 columns: first representing the entities (genes) and the second the attributes !'
  if(is.null(dim(entity.attribute)) ){
  }	else {
  	if( dim(entity.attribute)[2]!=2) stop(err.msg)

  ### should have no NA or NULL
  if(sum(is.null(as.vector(entity.attribute)))>0 | sum(is.na(as.vector(entity.attribute)))>0){
  	stop('The entity attribute structure must have no NULL or NA values !')	
  if(nrow(unique(entity.attribute)) != nrow(entity.attribute)){
  	stop('Found duplicate attributes for same entity !')	
  if(message) print('Validation OK!')

Try the ClusterJudge package in your browser

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

ClusterJudge documentation built on Nov. 8, 2018, 2:02 a.m.