I am trying to take 4 different inputs from the console in R, but the console takes the input only if I run the program line by line separately. If I send all the commands together there is no possibility to input the information: I tried with the print commented and without. Thanks for your help.
grow <-readline(prompt='what do you grow - answer T or B or C?')
#print(grow)
size = readline(prompt='what size is your field?')
#print(size)
size = as.numeric(size)
rain2 =readline(prompt='how much rain fell 2 months ago?')
#print(rain2)
rain2 = as.numeric(rain2)
rain1 =readline(prompt='how much rain fell last month?')
#print(rain1)
rain1 = as.numeric(rain1)