title: Does R have an equivalent of Python's "repr" (or Lisp's "prin1-to-string")?
body: <p>I occasionally find that it would be useful to get the printed representation of an R object as a character string, like Python's <code>repr</code> function or Lisp's <code>prin1-to-string</code>. Does such a function exist in R? I don't need it to work on complicated or weird objects, just simple vectors and lists.</p>
  
  <p>Edit: I want the string that I would have to type into the console to generate an identical object, not the output of <code>print(object)</code>. </p>