Is that the complete error message? Normally R will tell you where the
error came from, e.g.
Error in session$sendInputMessage : $ operator is invalid for atomic vectors
Without the name of the function that signaled the error, it will be
difficult to diagnose the problem.
Regards,
Yihui