title: Add vector as data.frame element as is
body: <p>I have a <code>data.frame</code> consisting of (initially) one observation.
  From the original data, I have a list (more specifically, a character vector) which should be appended to the data.frame as a new column and contained in a single element.  </p>
  
  <p>Specifically, I have this data.frame:  </p>
  
  <pre><code>&gt; str(stats.df)
  'data.frame':   1 obs. of  174 variables:
   $ stat.mineBlock.minecraft.furnace              : num 1
   $ stat.useItem.minecraft.fence_gate             : num 1
   $ stat.useItem.minecraft.stone_brick_stairs     : num 3
   $ stat.killEntity.Sheep                         : num 20
   $ stat.useItem.minecraft.cobblestone            : num 18  
  </code></pre>
  
  <p>And I want to add the following:</p>
  
  <pre><code>&gt; str(stats.list$achievement.exploreAllBiomes$progress)
    chr [1:6] "Desert" "Extreme Hills" "Ocean" "Extreme Hills Edge" "River" "Hell"
  </code></pre>
  
  <p>So that </p>
  
  <pre><code> &gt; stats.df$achievement.exploreAllBiomes.progress
    [1] "Desert"             "Extreme Hills"      "Ocean"              "Extreme Hills Edge"
    [5] "River"              "Hell" 
  </code></pre>
  
  <p>Because <code>stats.list$achievement.exploreAllBiomes</code> contains to elements: <code>value</code>, which is a numeric, and <code>progress</code>, which is a character vector. I want my <code>stats.df</code> to contain each of those as separate columns.</p>
  
  <p>My problem is that the data.frame is expanded with additional rows for each element of the character vector, so that each row of the data.frame is identical and only varies in the <code>achievement.exploreAllBiomes.progress</code> field, where each row contains one element of said vector.</p>
  
  <p>I have tried the following 3 three things, with and without using <code>I()</code>:</p>
  
  <pre><code> stats.df$achievement.exploreAllBiomes.progress        &lt;- I(stats.list$achievement.exploreAllBiomes$progress)
   stats.df$achievement.exploreAllBiomes.progress[1]     &lt;- I(stats.list$achievement.exploreAllBiomes$progress)
   cbind(stats.df, achievement.exploreAllBiomes.progress = I(stats.list$achievement.exploreAllBiomes$progress))
  </code></pre>
  
  <p>Receiving either </p>
  
  <pre><code> Error in `$&lt;-.data.frame`(`*tmp*`, "achievement.exploreAllBiomes.progress",  : 
   replacement has 6 rows, data has 1
  </code></pre>
  
  <p>or the duplicate row variant.
  I assumed <code>I()</code>would do the trick, but it only seems to work when constructing the data.frame from scratch, so I tried constructing <code>stats.df</code> with that in mind:</p>
  
  <pre><code>stats.df &lt;- data.frame(stats.list[names(stats.list) != "achievement.exploreAllBiomes"],
                       achievement.exploreAllBiomes.value    = stats.list$achievement.exploreAllBiomes$value,
                       achievement.exploreAllBiomes.progress =  I(stats.list$achievement.exploreAllBiomes$progress))
  </code></pre>
  
  <p>But again this produced the duplicate rows.
  I know that it is possible for an element in a data.frame to contain a vector or list, so I assume there has to be a fairly easy way to achieve this which I'm probably just not seeing.</p>