SCM

SCM Repository

[batman] View of /pkg/batman/R/menuA.R
ViewVC logotype

View of /pkg/batman/R/menuA.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 120 - (download) (annotate)
Tue Feb 12 16:30:46 2013 UTC (6 years, 7 months ago) by jie
File size: 567 byte(s)
pkg
menuA<-function (choices, stInd, showLine) 
{
  ## written by Dr. Jie Hao
  ## menue function, for internal use
  nc <- length(choices)
  cat(showLine)
  if (stInd == 1) {
    op <- paste(format(seq_len(nc)), ": ", choices, sep = "")
    st <-stInd
    ed<-nc+stInd-1
  } else if (stInd == 0) {
    op <- paste(format(seq_len(nc)-1), ": ", choices, sep = "")
    st <-stInd
    ed<-nc+stInd-1
  }
  cat("  ", op, "", sep = "\n")
  repeat {
    ind <- .Internal(menu(as.character(choices)))
    if (ind >= st && ind <= ed) 
      return(ind)
  }
}

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge