R/getinput.R

Defines functions getinput

Documented in getinput

getinput<-function(lowlim=0,highlim=1)
{
  ## written by Dr. Jie Hao, Imperial College London
  ## get input from user, for internal use
  repeat {
    inp<- scan(n=1, quiet = TRUE)
    if (length(inp)) {
      if (highlim>0) {
        if (inp >= lowlim && inp <= highlim ) 
          return(inp)
      } else {
        if (inp >= lowlim )
          return(inp)
      }
    }  
  }
}

Try the batman package in your browser

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

batman documentation built on May 2, 2019, 6:13 p.m.