If you are using version 4.x.x of R, a SUBMIT / R block in PROC IML can issue a series of errors that includes the following messages:
ERROR: SAS is unable to transcode character data to the R encoding.
ERROR: The final R statement is incomplete.
The only workaround is to revert to version 3.x.x of R.