title: R dataframe (>2 columns) to named list
body: <p>I am trying to get a data frame row to a named list where the dataframe column header values become the keys of the named list.</p>
  
  <p>Transposing the row seemed like a good idea, but then trying to coerce this to a list doesn't have the desired effect.</p>
  
  <p>My attempt so far:</p>
  
  <pre><code>t(df[1, ]) # seems useful
  list(t(df[1, ])) # but this doesn't have the desired effect
  </code></pre>
  
  <p>Reproducible:</p>
  
  <pre><code>n = c(2, 3, 5) 
  s = c("aa", "bb", "cc") 
  b = c(TRUE, FALSE, TRUE) 
  df = data.frame(n, s, b)  
  </code></pre>
  
  <p>Desired effect for first row:</p>
  
  <pre><code>list(n = 2, 
       s = aa,
       b = TRUE)
  </code></pre>