0

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.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.