title: Taking Multiple User inputs in R
body: <p>I am creating a program that tracks tools around a warehouse in R. Here is what I have so far:</p>
  
  <pre><code>tool &lt;- readline(prompt='Enter a Barcode: ')
  if (! tool %in% df$Barcode.Number) {
  message("Barcodes not found.")
  } else {
  initials &lt;- readline(prompt='Enter your Initials: ')
  job &lt;- readline(prompt='Enter job number: ')
  suppressMessages(library(dplyr))
  message("Good to Go!")
  df[df$Barcode.Number == tool, "DATE"]  = as.character(Sys.Date())
  df[df$Barcode.Number == tool, 'Initial'] = initials
  df[df$Barcode.Number == tool, 'Job.Number'] = job
  df1 &lt;- df %&gt;% filter(df$Barcode.Number == tool) %&gt;% 
  select(Type.Equipment, Location)
  print(df1)
  df[df$Barcode.Number == tool, "Usage"] = df[df$Barcode.Number == 
  tool, "Usage"] + 0.5
  df$Status &lt;- ifelse((df$Usage %% 1) , 'Out', 'In')
  }
  </code></pre>
  
  <p>Along with some sample Data:</p>
  
  <pre><code>Barcode.Number    Type.Equipment Manufacture Times.Used Initials  Job 
      4041        Flashlight    Surefire          1    GP        0
      4680           Capstan       Honda          1    GP        0
      4682 Deep Cut Band Saw   Milwaukee          1    GP        0
  </code></pre>
  
  <p>As you can see, it takes a tool argument, along with an initial and work number input, and updates the columns Date, Job Number, Times.Used, and Initial, based on the inputs from the user. I am having trouble though with inputting multiple values in for variable tool. It currently can only take one number at a time, and thats not necessarily practical for someone looking to check out multiple different items under the same initials and job. This question could be simple but how can I accept multiple different input numbers for tool, and have it still be able to update the data frame for both tools at the the same time. I have tried the following:</p>
  
  <pre><code>tool &lt;- readline(prompt='Enter the Barcodes: ')
  tools &lt;-scan(text=tool,quiet=TRUE,sep=",")
  </code></pre>
  
  <p>This will save the tools that I have entered as different numbers, but it wont update the frame for the numbers that it saves. I am new to R so any help is greatly appreciated. Thanks!</p>