Thanks for writing in! So, unfortunately, there is no way to get an input dataset dynamically with R to be saved as a code sample. The most convenient option would be use the variables that are provided within an R recipe. Of course, you always can hardcode the input dataset as well.
If you have any further questions, please let us know.