I am a bit of a newbie when it comes to R programming, so please forgive me if this sounds obvious or misguided.
I am using an R package called bcrm (which does clever things for dose escalation for clinical trials in cancer), and when I run it interactively, it asks me for input via the terminal.
I would like to be able to run it non-interactively. Is there any way I can write a script that includes not only the command to invoke the bcrm package, but also the answer to the questions it asks subsequently?
Edit 21 Dec 2018: here's the code that asks me for interactive input. I'd love to put some code after the last bit of it (or maybe in a DOS batch script) that supplies the input, which consists of entering a series of numbers.
library(bcrm)
dose.levels <- c(1, 2, 3, 4)
prior.tox <- c(0.05, 0.1, 0.2, 0.3)
cohort.size <- 3
target.tox <- 0.33
max.size <- 6
prior.mean <- c(-0.5, 0.01)
prior.vcm <- matrix(c(0.5, 0.3, 0.3, 2), ncol=2)
prior.dist <- list(4, prior.mean, prior.vcm) 
tox.seq <- c(0, 0, 0)
dose.seq <- c(1, 1, 1)
mydata <- data.frame(patient = 1:3, dose=dose.seq, tox=tox.seq)
crm<-bcrm(dose = dose.levels,               # Dose levels
          p.tox0 = prior.tox,               # Prior probabilities of DLT
          target.tox = target.tox,          # Target tox level
          cohort = cohort.size,             # Cohort size
          stop = list(nmax = max.size),     # Stopping criteria
          ff = "logit2",                    # Model
          prior.alpha = prior.dist,         # Prior distribution on model parameter
          sdose.calculate = "median",       # How to calculate dose labels
          pointest = "plugin",              # How we will estimate DLT risks
          data = mydata,                    # Data so far
          simulate = FALSE,                 # Simulate lots of trials?
          method="rjags",                   # Calculation method
          truep = prior.tox,                # True probabilities, assume same as prior
          plot = TRUE)                      # Plot trial data as we go
 
     
     
    