R/dag.search.R

dag.search <-
function (dag, type="brute", allow.unknown = FALSE, trace = FALSE, stop = 0) 
{
  dag$searchType<-NULL;
  dag$searchRes<-NULL;

  if(type=="brute")
   searchRes<-brute.search(dag, allow.unknown=allow.unknown,
                                trace=trace, stop=stop);
 
  rv <- dag;
  rv$searchType<-paste(c(type, ifelse(allow.unknown==FALSE,
                             "unknowns not allowed",
                             "unknowns allowed"),
                             ifelse(stop==0, "no early stopping",
                                             "early stopping possible")),
                       collapse=", ");
  rv$searchRes<-searchRes;
  return(rv);
}

Try the dagR package in your browser

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

dagR documentation built on Oct. 9, 2022, 5:06 p.m.