R/detachSelect.R

Defines functions detachSelect

Documented in detachSelect

detachSelect <-
function() {
   tmp <- search()
	present <- tmp[2:(length(tmp)-1)]
   choice <-  select.list(present, multiple=TRUE,
		title="Select items to detach")
   if(length(choice) == 0) {
      cat("No objects selected for detachment.\n")
      return(invisible(NULL)) # invisible inserted 080603
   }
   for(to.rm in choice)
      while(to.rm %in% search()) {
#         cat("Detaching:", to.rm, "\n")
         eval(substitute(detach(n), list(n=to.rm)))
     }
   return(choice)
}
mikemeredith/MMmisc documentation built on Nov. 8, 2019, 11:34 p.m.