title: Embed R code into BASH unix script
body: <p>We know that we can embed AWK or SED directly into a BASH script by 
  awk { ....}
  . I wanted to do something similar to R such as 
  mybashscript.sh
  R { .... } </p>
  
  <p>without having to create a .R file and calling the .R file from bash using Rscript myRscript.R</p>
  
  <p>Is there a way to do this. I have searched everywhere but was not able to find an answer. Please help.</p>