R/list2Set.R

list2Set <-
function (v=c(0)) {
      nv<-list( c(v[[1]]) );
      if (length(v) > 1 ) for (i in 2:length(v) ) {
          if (!is.element( list(c(v[[i]])), nv)) nv<-c( nv, list(v[[i]]));
      }
  return(nv);
}

Try the kStatistics package in your browser

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

kStatistics documentation built on June 8, 2022, 5:05 p.m.