I'm writing a script that asks for multiple user inputs using the command:
readline(prompt = "Question here")
My first attempt at the beginning of the script works correctly. I'm asking for a sequence ID, the console pauses, waits for me to input the sequence ID, and then resumes when I press enter. The problem comes at the end of my script when I make a .csv file. I have something like this:
csv_name <- readline(prompt = "Input the name of the file: ")
write.csv(df, csv_name)
The script doesn't stop running here, and attempts to name the csv as "", which obviously doesn't work. Is there a workaround for this?
I have tried putting the write.csv command in a value, but that doesn't stop it either.