0

I have an script file with several lines of code that works perfectly.

Now I'm trying to use it more intensively so I'd like to introduce a question at the beginning of the script and then use the value of the question (answer) and replace some parts of my code with the answer value.

Something like this:

readline(prompt = "Question 1?: ")
#user input = Y
#Find "X" (previous value in my code lines) and Replace All with "Y"

Then re-run my code with the new "Y" value in and get the results, so the re-run I assume should be executed starting after the line with the Replace All.

Is that possible? Maybe gsub?

Any comments will be appreciated.

Thanks.

Rick
  • 171
  • 1
  • 13
  • You need to include your code to get more specific help. At the very least, include a small reproducible example (https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with a simplified version of what you're trying to do. – Melissa Key Jun 18 '18 at 15:15
  • You are right. Let me prepare a small example. Thanks ;-) – Rick Jun 18 '18 at 15:32

0 Answers0