0
如何根據「business_id」和「type」變量合併R中的兩個列表。嘗試了幾個選項,但他們沒有工作,包括將它們轉換爲數據框並嘗試使用合併功能合併它們。如何根據鍵值合併R中的兩個列表
的名單
LIST1
$ :List of 5
..$ business_id : chr "ABC"
..$ full_address : chr "DEF"
..$ hours : chr "4-6PM"
..$ open : logi TRUE
..$ type : chr "business"
LIST2
$ :List of 3
..$ checkin_info:List of 3
.. ..$ 7-6 : num 1
.. ..$ 15-0: num 1
.. ..$ 15-3: num 1
..$ type : chr "business"
..$ business_id : chr "ABC"
結果應該是
合併的列表 $:6 名單.. $ business_id:字符 「ABC」 .. $ full_address:字符 「DEF」 .. $ hours:chr「4-6PM」 .. $ open:logi TRUE .. $ type:chr「business」 .. $ checkin_info:List of 3 .. .. $ 7-6:num 1 .. .. $ 15-0:num 1 .. .. $ 15-3:num 1
你應該提供一個[重複的例子(http://stackoverflow.com/questions/5963269/how-to-make具有樣本輸入數據(以複製/粘貼友好的格式)和期望的輸出。請準確描述「合併」列表的含義。 – MrFlick