title: How can I join two data that have different types of data?
body: <p>Let's say I have two data.
  one is like this:</p>
  
  <pre><code>names |height
  ------|------
  "ab"  |176
  ------|--------
  "aa"  |168
  ------|--------
  "ac"  |189
  ------|--------
  "ad"  |179
  </code></pre>
  
  <p>and the other is like this:</p>
  
  <pre><code>names           weight
  c("aa","ab")    58
  c("ac","ae")    70
  "ad"            68
  </code></pre>
  
  <p>so the second names are list, but the first names are just vector.
  I want to make like this:</p>
  
  <pre><code>names  height  weight
  "ab"   176     58
  "aa"   168     58
  "ac"   189     70
  "ad"   179     68
  </code></pre>
  
  <p>I tried to use left_join, but it didn't work.
  And I also tried to make list to vector.
  When I made list to vector, the problem is lengths are different each other.
  Please, can you help me???
  This is my first question on stackoverflow.</p>
  
  <p>Add my code</p>
  
  <pre><code>names&lt;-c("ab","aa","ac","ad")
  height&lt;-c(176,168,189,179)
  data1&lt;-cbind(names,height)
  names&lt;-list(c("aa","ab"),c("ac","ae"),"ad")
  weight&lt;-c(58,70,68)
  data2&lt;-cbind(names,weight)
  data1&lt;-as.data.frame(data1) ;data1;str(data1)
  data2&lt;-as.data.frame(data2) ;data2;str(data2)
  data2 %&gt;%
  </code></pre>
  
  <p>unnest %>%
    left_join(.,data1, by = "names")</p>