The SUBMIT / R statement enables you to submit R statements that you have already developed and debugged in an R session. It does not create an R session with a program console for you to interactively work on a program.
However, when you use the SAS/IML interface, R does not go away after the ENDSUBMIT statement, so a certain degree of interaction is possible. For example, see the first item/example on the list in this article: Twelve advantages to calling R from the SAS/IML language - The DO Loop
Other interactions are also possible. For example, run the following program and follow its directions:
proc iml;
run ExportDataSetToR("Sashelp.cars", "cars");
submit / R;
plot( cars$MPG_City, cars$MPG_Highway )
print ("Click on markers where MPG_City>40")
print ("Then right-click and select 'Stop'")
sel <- identify(cars$MPG_City, cars$MPG_Highway)
endsubmit;
/* retrieve obs numbers of selected obs and print in PROC IML */
run ImportMatrixFromR(selList, "sel");
use Sashelp.Cars;
read all var {Make Model};
close Sashelp.Cars;
print (Make[selList]||Model[selList])[L="The Selected Cars"];
http://blogs.sas.com/content/iml/2013/11/25/twelve-advantages-to-calling-r-from-the-sasiml-language/