R/getnames.R

getnames <-
function(obj){
  tmp=paste(as.character(obj), collapse=" + ")
  
  tt=unique(unlist(strsplit(tmp," + ", fixed=TRUE)))
  if(any(tt=="+") | any(tt=="|")){
    id=as.numeric(tt=="+"|tt=="|")
    return(tt[-which(id!=0)])
  } else{
    return(tt)
  }
}

Try the SPREDA package in your browser

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

SPREDA documentation built on May 2, 2019, 4 p.m.