5 4 1 0 bytes
Thanks to JayCe for contributing the one-byte answer!
There are a number of short R programs that would ...
take a string as input, and output a piece of code in the same
language that, when run, will output the initial input string
. Some of these are listed below, one on each row, in descending order of length:
identity # 8 bytes
force # 5 bytes
eval # 4 bytes
c # 1 byte
# 0 bytes
This is inspired by NoOneIsHere's 1-byte answer in Pyth which is said to "just evaluate the input". This is exactly what
c achieve the same result in different ways. But why stop here? When you feed a string into R, it will be evaluated (to itself) and printed in quotes. A quoted string is a valid R program. That's the idea of the 0-byte answer.
Uniquely, the same program works identically in R and Python:
> "yo ho ho and a bottle of rum"
 "yo ho ho and a bottle of rum"
>>> 'yo ho ho and a bottle of rum'
'yo ho ho and a bottle of rum'