title: How to create text connection from string variable?
body: <p>This should be quick to answer:</p>
  
  <p>I want to use jags packages' <code>jags.model</code> function. Among many arguments it needs the argument <code>file</code>:</p>
  
  <blockquote>
    <p><code>file</code> - the name of the file containing a description of the model in
    the JAGS dialect of the BUGS language. </p>
    
    <p>Alternatively, file can be a
    readable text-mode connection, or a complete URL.</p>
  </blockquote>
  
  <p>I want to pass string to this argument. One way to walk-around this problem is to write the string into temporary file and pass the file name. But I hope there is a straightforward way to convert string into connection.</p>