0

I know that this is probably trivial to most of you but, I haven't used apply functions all that much. Also, due to performance reasons, I am trying to refrain from using for loop and would like to utilize lapply function instead.

I have a results list which contains n sublists with the same sublist components ("shipment", "orders", "boxes", "prepacks"). So, what I would like to do is: combine all the sublists into one list results with four sublist of ("shipment", "orders", "boxes", "prepacks").

Here is the structure of the results list

dput(results[[1]])

list(shipment = structure(list(TransactionTimeUtc = structure(c(1582023318.99033, 1582023319.11, 1582023319.30792, 1582023319.44646, 1582023319.95777, 1582023320.15857), class = c("POSIXct", "POSIXt"), tzone = "UTC"), Operation = c("insert", "insert", "insert", "insert", "insert", "insert"), Collection = c("shipment", "shipment", "shipment", "shipment", "shipment", "shipment"), AppId = c("logistics.bi.datapublisher", "logistics.bi.datapublisher", "logistics.bi.datapublisher", "logistics.bi.datapublisher", "logistics.bi.datapublisher", "logistics.bi.datapublisher"), Document.ShipmentId = c("11058187", "11058183", "11058185", "11058191", "11058190", "11058196" ), Document.IsFreightForwarded = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), Document.CustomerId = c(38883L, 24826L, 81640L, 27319L, 16306L, 156776L), Document.DispatchDate = structure(c(1582002000, 1582002000, 1582002000, 1582002000, 1582002000, 1582002000 ), class = c("POSIXct", "POSIXt"), tzone = "UTC"), Document.ReadyToShipDate = structure(c(1582014305.557, 1582012026.518, 1582010013.899, 1582014501.524, 1582014852.788, 1582012136.384), class = c("POSIXct", "POSIXt"), tzone = "UTC"), Document.ShipDate = c("2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z"), Document.CompletedByUserId = c(22241L, 22241L, 22241L, 22241L, 22241L, 22241L), Document.ShipAttention = c("BAOPING CAO", NA, "CHUNQING CHEN", "WENZHU WU", "SHANSHAN FU", "XIN ZHANG" ), Document.ModelVersion = c(2L, 2L, 2L, 2L, 2L, 2L), Document.ShippedByUserId = c(438L, 438L, 438L, 438L, 438L, 438L), Document.TotalQtyShipped = c(1L, 3L, 2L, 1L, 1L, 1L), Document.Itn = c(NA, NA, NA, NA, NA, NA), Document.ShipmentReference = c("B11058187", "B11058183", "B11058185", "B11058191", "B11058190", "B11058196"), Document.ConsolidationMethod = c("0", "0", "0", "0", "0", "0"), Document.ShipmentType = c("RR", "RR", "RR", "RR", "RR", "RR"), Document.RealShipDate = c("2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z", "2020-02-18T05:00:00Z"), Document.PortOfLading = c("GUANGZHOU", "GUANGZHOU", "GUANGZHOU", "GUANGZHOU", "GUANGZHOU", "GUANGZHOU" ), Document.LeadTrackingNumber = c("295841879239", "295840702753", "295839545260", "295841999709", "295842158158", "295840755210" ), Document.Billing.IsBilled = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), Document.Billing.CustomerBilling.IsoCurrencyCode = c("CNY", "CNY", "CNY", "CNY", "CNY", "CNY"), Document.Billing.CustomerBilling.CompanyId = c(10L, 10L, 10L, 10L, 10L, 10L), Document.Billing.CustomerBilling.IsSAB = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), Document.Billing.CustomerBilling.TermId = c(4L, 1L, 1L, 4L, 3L, 1L), Document.Billing.CustomerBilling.IsDistributor = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), Document.Billing.CustomerBilling.IsBillTax = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), Document.Billing.CustomerBilling.CustomerId = c(38883L, 24826L, 81640L, 27319L, 16306L, 156776L), Document.Billing.CustomerBilling.BillingId = c(12920L, 6510L, 38838L, 7099L, 9036L, 997359L), Document.Billing.CustomerBilling.Address.Division = c("", "", "", "", "", ""), Document.Billing.CustomerBilling.Address.IsoCountryCode = c("CN", "CN", "CN", "CN", "CN", "CN"), Document.Billing.CustomerBilling.Address.AddressId = c(53750L, 34998L, 141602L, 268186L, 40823L, 288577L), Document.Billing.CustomerBilling.Address.City = c("JIANGSU", "JIANGSU", "BEIJING", "ANHUI", "BEIJING", "GUANGDONG"), Document.Billing.CustomerBilling.Address.AddressLine2 = c("NANJING ECONOMIC AND TECH DEVELOPMENT ZONE", "INDUSTRIAL DEVELOPMENT ZONE HANJIANG RD", "NO.8 LIANGSHUIHE ROAD", "HIGH-TECH DEVELOPMENT ZONE", "LIANDONG U GU DEVELOPMENT ZONE", "NANXIN ROAD, NANSHAN DISTRICT"), Document.Billing.CustomerBilling.Address.AddressLine3 = c("NANJING", "WUXI", "CHANGPING DISTRICT", "GEJIANG DISTRICT WUHU", "MAJUQIAO TOWN TONGZHOU DISTRICT", "SHENZHEN"), Document.Billing.CustomerBilling.Address.AddressLine1 = c("NO.11 HENGJING ROAD", "BLOCK 51-A NATIONAL HI-TECH", "ROOM 301", "HUAXIA SCIENCE PARK 506", "NO.15 JINGSHENG SOUTH STREET", "ROOM 11A2, SUHAO BUILDING," ), Document.Billing.CustomerBilling.Address.PostalCode = c("210013", "214028", "102200", "241006", "101102", "518000"), Document.Billing.CustomerBilling.Address.AddressName = c("Nanjing Kangni Technology Industry Co., Ltd.", "Wuxi Pro-Face Co Ltd", "BEIJING BAIHETONG Mechanical & Electrical", "Anhui Huadong Polytechnic Institute", "BEIJING SINBON ELECTRIC CO LTD", "SHENZHEN HONGTAIRUI TECHNOLOGY CO.,LTD"), Document.Billing.CustomerBilling.Address.StateCode = c("", "", "", "", "", ""), Document.PrecisionConfig.Locale = c("TEAMRM", "TEAMRM", "TEAMRM", "TEAMRM", "TEAMRM", "TEAMRM"), Document.PrecisionConfig.Client = c("GZ", "GZ", "GZ", "GZ", "GZ", "GZ"), Document.PrecisionConfig.Language = c("STE", "STE", "STE", "STE", "STE", "STE"), Document.PrecisionConfig.PackingLocation = c("GZ", "GZ", "GZ", "GZ", "GZ", "GZ"), Document.Status.ChangedDate = c("2020-02-18T10:55:18.534Z", "2020-02-18T10:55:18.122Z", "2020-02-18T10:55:18.329Z", "2020-02-18T10:55:18.94Z", "2020-02-18T10:55:18.846Z", "2020-02-18T10:55:19.471Z"), Document.Status.StatusId = c(4L, 4L, 4L, 4L, 4L, 4L), Document.Status.Description = c("Shipped", "Shipped", "Shipped", "Shipped", "Shipped", "Shipped"), Document.TranslationInfo.BillToAddress.City = c("", "", "", "", "", ""), Document.TranslationInfo.BillToAddress.Name = c(" ",

"<U+65E0><U+9521><U+5E02> <U+65E0><U+9521><U+666E><U+6D1B><U+83F2><U+65AF><U+7535><U+5B50><U+6709><U+9650><U+516C><U+53F8> ", 
"<U+5317><U+4EAC><U+67CF><U+548C><U+901A><U+673A><U+7535><U+8BBE><U+5907><U+6709><U+9650><U+516C><U+53F8>",

"<U+4E2D><U+822A><U+534E><U+4E1C><U+5149><U+7535><U+6709><U+9650><U+516C><U+53F8>",

"<U+5317><U+4EAC><U+4FE1><U+90A6><U+7535><U+5B50><U+6709><U+9650><U+516C><U+53F8>",

"<U+6DF1><U+5733><U+5E02><U+9E3F><U+6CF0><U+745E><U+79D1><U+6280><U+6709><U+9650><U+516C><U+53F8>"
), Document.TranslationInfo.BillToAddress.CountryIso = c("CN", 
"CN", "CN", "CN", "CN", "CN"), Document.TranslationInfo.BillToAddress.Line3 = c(NA, 
NA, NA, NA, NA, NA), Document.TranslationInfo.BillToAddress.Line2 = c(NA, 
NA, NA, NA, NA, NA), Document.TranslationInfo.BillToAddress.Line1 = c("<U+5357><U+4EAC><U+5E02><U+7ECF><U+6D4E><U+6280><U+672F><U+5F00><U+53D1><U+533A><U+6052><U+7ADE><U+8DEF>11<U+53F7>",

"<U+65E0><U+9521><U+56FD><U+5BB6><U+9AD8><U+65B0><U+6280><U+672F><U+4EA7><U+4E1A><U+5F00><U+53D1><U+533A>51-A<U+53F7><U+5730><U+5757>",

"<U+5317><U+4EAC><U+5E02><U+660C><U+5E73><U+533A><U+79D1><U+6280><U+56ED><U+533A><U+51C9><U+6C34><U+6CB3><U+8DEF>8<U+53F7>301<U+5BA4>",

"<U+829C><U+6E56><U+9AD8><U+65B0><U+5F00><U+53D1><U+533A><U+534E><U+590F><U+79D1><U+6280><U+56ED>506<U+4FE1><U+7BB1>", 
"<U+5317><U+4EAC><U+5E02><U+901A><U+5DDE><U+533A><U+9A6C><U+9A79><U+6865><U+9547><U+8054><U+4E1C>U<U+8C37><U+5F00><U+53D1><U+533A><U+897F><U+533A><U+666F><U+76DB><U+5357><U+56DB><U+8857>15<U+53F7>",

"<U+6DF1><U+5733><U+5E02><U+5357><U+5C71><U+533A><U+5357><U+65B0><U+8DEF><U+82CF><U+8C6A><U+540D><U+53A6>11A2<U+5BA4>"
), Document.TranslationInfo.BillToAddress.State = c("<U+6C5F><U+82CF>", 
"<U+6C5F><U+82CF>", "", "<U+5B89><U+5FBD>", "<U+5317><U+4EAC>", 
NA), Document.TranslationInfo.SoldToAddress.City = c("<U+5357><U+4EAC>", 
"<U+65E0><U+9521>", "<U+5317><U+4EAC>", "<U+829C><U+6E56>", 
"<U+5317><U+4EAC>", "<U+5E7F><U+4E1C>"), Document.TranslationInfo.SoldToAddress.Name =

c(" ",

"<U+65E0><U+9521><U+5E02> <U+65E0><U+9521><U+666E><U+6D1B><U+83F2><U+65AF><U+7535><U+5B50><U+6709><U+9650><U+516C><U+53F8> ", 
"<U+5317><U+4EAC><U+67CF><U+548C><U+901A><U+673A><U+7535><U+8BBE><U+5907><U+6709><U+9650><U+516C><U+53F8>",

"<U+4E2D><U+822A><U+534E><U+4E1C><U+5149><U+7535><U+6709><U+9650><U+516C><U+53F8>",

"<U+5317><U+4EAC><U+4FE1><U+90A6><U+7535><U+5B50><U+6709><U+9650><U+516C><U+53F8>",

"<U+6DF1><U+5733><U+5E02><U+9E3F><U+6CF0><U+745E><U+79D1><U+6280><U+6709><U+9650><U+516C><U+53F8>"
), Document.TranslationInfo.SoldToAddress.CountryIso = c("CN", 
"CN", "CN", "CN", "CN", "CN"), Document.TranslationInfo.SoldToAddress.Line3 = c(NA, 
NA, NA, NA, NA, NA), Document.TranslationInfo.SoldToAddress.Line2 = c(NA, 
NA, NA, NA, NA, NA), Document.TranslationInfo.SoldToAddress.Line1 = c("<U+5357><U+4EAC><U+5E02><U+7ECF><U+6D4E><U+6280><U+672F><U+5F00><U+53D1><U+533A><U+6052><U+7ADE><U+8DEF>11<U+53F7>",

"<U+65E0><U+9521><U+56FD><U+5BB6><U+9AD8><U+65B0><U+6280><U+672F><U+4EA7><U+4E1A><U+5F00><U+53D1><U+533A>51-A<U+53F7><U+5730><U+5757>",

"<U+5317><U+4EAC><U+5E02><U+660C><U+5E73><U+533A><U+79D1><U+6280><U+56ED><U+533A><U+51C9><U+6C34><U+6CB3><U+8DEF>8<U+53F7>301<U+5BA4>",

"<U+829C><U+6E56><U+9AD8><U+65B0><U+5F00><U+53D1><U+533A><U+534E><U+590F><U+79D1><U+6280><U+56ED>506<U+4FE1><U+7BB1>", 
"<U+5317><U+4EAC><U+5E02><U+901A><U+5DDE><U+533A><U+9A6C><U+9A79><U+6865><U+9547><U+8054><U+4E1C>U<U+8C37><U+5F00><U+53D1><U+533A><U+897F><U+533A><U+666F><U+76DB><U+5357><U+56DB><U+8857>15<U+53F7>",

"<U+6DF1><U+5733><U+5E02><U+5357><U+5C71><U+533A><U+5357><U+65B0><U+8DEF><U+82CF><U+8C6A><U+540D><U+53A6>11A2<U+5BA4>"
), Document.TranslationInfo.SoldToAddress.State = c("<U+6C5F><U+82CF>", 
"<U+6C5F><U+82CF>", "", "<U+5B89><U+5FBD>", "<U+5317><U+4EAC>", 
NA), Document.TranslationInfo.ShipToAddress.City = c("<U+5357><U+4EAC>", 
"<U+65E0><U+9521>", "<U+5317><U+4EAC>", "<U+829C><U+6E56>", 
"<U+5317><U+4EAC>", "<U+5E7F><U+4E1C>"), Document.TranslationInfo.ShipToAddress.Name =

c(" ",

"<U+65E0><U+9521><U+5E02> <U+65E0><U+9521><U+666E><U+6D1B><U+83F2><U+65AF><U+7535><U+5B50><U+6709><U+9650><U+516C><U+53F8> ", 
"<U+5317><U+4EAC><U+67CF><U+548C><U+901A><U+673A><U+7535><U+8BBE><U+5907><U+6709><U+9650><U+516C><U+53F8>",

"<U+4E2D><U+822A><U+534E><U+4E1C><U+5149><U+7535><U+6709><U+9650><U+516C><U+53F8>",

"<U+5317><U+4EAC><U+4FE1><U+90A6><U+7535><U+5B50><U+6709><U+9650><U+516C><U+53F8>",

"<U+6DF1><U+5733><U+5E02><U+9E3F><U+6CF0><U+745E><U+79D1><U+6280><U+6709><U+9650><U+516C><U+53F8>"
), Document.TranslationInfo.ShipToAddress.CountryIso = c("CN", 
"CN", "CN", "CN", "CN", "CN"), Document.TranslationInfo.ShipToAddress.Line3 = c(NA, 
NA, NA, NA, NA, NA), Document.TranslationInfo.ShipToAddress.Line2 = c(NA, 
NA, NA, NA, NA, NA), Document.TranslationInfo.ShipToAddress.Line1 = c("<U+5357><U+4EAC><U+5E02><U+7ECF><U+6D4E><U+6280><U+672F><U+5F00><U+53D1><U+533A><U+6052><U+7ADE><U+8DEF>11<U+53F7>",

"<U+9521><U+592A><U+516C><U+8DEF><U+5EF6><U+7965><U+8DEF><U+666E><U+6D1B><U+65AF><U+9E45><U+6E56><U+7269><U+6D41><U+56ED><U+533A>B3-1<U+5E93>

18888048952 /13771174954()",

"<U+5317><U+4EAC><U+5E02><U+660C><U+5E73><U+533A><U+79D1><U+6280><U+56ED><U+533A><U+51C9><U+6C34><U+6CB3><U+8DEF>8<U+53F7>301<U+5BA4>",

"<U+829C><U+6E56><U+9AD8><U+65B0><U+5F00><U+53D1><U+533A><U+534E><U+590F><U+79D1><U+6280><U+56ED>  (<U+8BF7><U+7528><U+987A><U+4E30><U+53D1>,<U+968F><U+8D27><U+9644><U+5408><U+683C><U+8BC1>)",

"<U+5317><U+4EAC><U+5E02><U+901A><U+5DDE><U+533A><U+9A6C><U+9A79><U+6865><U+9547><U+8054><U+4E1C>U<U+8C37><U+5F00><U+53D1><U+533A><U+897F><U+533A><U+666F><U+76DB><U+5357><U+56DB><U+8857>15<U+53F7>

", "11A2" ), Document.TranslationInfo.ShipToAddress.State = c("", "", "", "", "", NA), Document.ShipFromFacility.Code = c("GZ", "GZ", "GZ", "GZ", "GZ", "GZ"), Document.ShipFromFacility.PackingLocation = c("GZ", "GZ", "GZ", "GZ", "GZ", "GZ"), Document.EndOfDayData.EodStartedDate = c("2020-02-18T10:55:16.039Z", "2020-02-18T10:55:16.039Z", "2020-02-18T10:55:16.039Z", "2020-02-18T10:55:16.039Z", "2020-02-18T10:55:16.039Z", "2020-02-18T10:55:16.039Z"), Document.EndOfDayData.EndOfDayId = c("5e4bc2944ad0b20a788c9f58", "5e4bc2944ad0b20a788c9f58", "5e4bc2944ad0b20a788c9f58", "5e4bc2944ad0b20a788c9f58", "5e4bc2944ad0b20a788c9f58", "5e4bc2944ad0b20a788c9f58"), Document.ShipTo.FacilityCode = c(NA, NA, NA, NA, NA, NA), Document.ShipTo.LocationId = c(46484L, 305058L, 109551L, 32449L, 36327L, 340964L), Document.ShipTo.Description = c("Nanjing Kangni Technology Industry Co., Ltd.", "WUXI PRO-FACE CO.,LTD", "BEIJING BAIHETONG Mechanical & Electrical", "Anhui Huadong Polytechnic Institute", "BEIJING SINBON ELECTRONICS CO LTD", "SHENZHEN HONGTAIRUI TECHNOLOGY CO.,LTD"), Document.ShipTo.Address.CountryId = c(42L, 42L, 42L, 42L, 42L, 42L), Document.ShipTo.Address.Name = c("Nanjing Kangni Technology Industry Co., Ltd.", "WUXI PRO-FACE CO.,LTD", "BEIJING BAIHETONG Mechanical & Electrical", "Anhui Huadong Polytechnic Institute", "BEIJING SINBON ELECTRONICS CO LTD", "SHENZHEN HONGTAIRUI TECHNOLOGY CO.,LTD"), Document.ShipTo.Address.CountryCode = c("CN", "CN", "CN", "CN", "CN", "CN"), Document.ShipTo.Address.Locality = c("JIANGSU", "WUXI", "BEIJING", "ANHUI", "BEIJING", "GUANGDONG"), Document.ShipTo.Address.Country = c("CHINA", "CHINA", "CHINA", "CHINA", "CHINA", "CHINA"), Document.ShipTo.Address.CompanyId = c(0L, 0L, 0L, 0L, 0L, 0L), Document.ShipTo.Address.AdministrativeArea = c(NA, NA, NA, NA, NA, NA), Document.ShipTo.Address.AddressLine2 = c("NANJING ECONOMIC AND TECH DEVELOPMENT ZONE", "Xitai Road Yanxiang Road", "NO.8 LIANGSHUIHE ROAD", "HIGH-TECH DEVELOPMENT ZONE", "LIANDONG U GU DEVELOPMENT ZONE", "NANXIN ROAD, NANSHAN DISTRICT" ), Document.ShipTo.Address.AddressLine3 = c("NANJING", "", "CHANGPING DISTRICT", "GEJIANG DISTRICT WUHU", "MAJUQIAO TOWN TONGZHOU DISTRICT", "SHENZHEN"), Document.ShipTo.Address.AddressLine1 = c("NO.11 HENGJING ROAD", "B3-1, GLP Logitics Park", "ROOM 301", "HUAXIA SCIENCE PARK 506", "2/F NO.15 JINGSHENG SOUTH 4 STREET", "ROOM 11A2, SUHAO BUILDING," ), Document.ShipTo.Address.PostalCode = c("210013", "214028", "102200", "241006", "101102", "518000"), Document.ShipTo.Address.Organization = c(NA, NA, NA, NA, NA, NA), Document.ShipTo.Address.StateId = c(NA, NA, NA, NA, NA, NA), Document.ShipTo.Address.Id = c(53751L, 241741L, 141603L, 36180L, 40824L, 288577L), Document.ShipTo.Address.StateCode = c(NA, NA, NA, NA, NA, NA), Document.Freight.ShipVia = c("SFEXPRESS", "SFEXPRESS", "SFEXPRESS", "SFEXPRESS", "SFEXPRESS", "SFEXPRESS" ), Document.Freight.FreightBill = c(NA, NA, NA, NA, NA, NA ), Document.Freight.TransportMode = c("40", "40", "40", "40", "40", "40"), Document.Freight.ServiceLevel = c("Priority Delivery", "Priority Delivery", "Priority Delivery", "Priority Delivery", "Priority Delivery", "Priority Delivery"), Document.Freight.Carrier = c("FedEx GZ", "FedEx GZ", "FedEx GZ", "FedEx GZ", "FedEx GZ", "FedEx GZ" ), Document.Freight.ServiceOption = c(NA, NA, NA, NA, NA, NA), Document.Freight.FreightCharge = c(0, 0, 0, 0, 0, 0)), class = "data.frame", row.names = c(NA, -6L)), orders = structure(list(Document.ShipmentId = c("11058187", "11058183", "11058183", "11058183", "11058185", "11058185", "11058191", "11058190", "11058196"), SourceType = c("Samtec", "Samtec", "Samtec", "Samtec", "Samtec", "Samtec", "Samtec", "Samtec", "Samtec"), ScheduleB = c("8536.69.4040", "8536.69.4040", "8536.69.4040", "8536.69.4040", "8538.90.7040", "8538.90.7080", "8536.69.4040", "8538.90.7080", "8544.42.0000"), OrderNumber = c(28937505L, 28966001L, 28966012L, 28966007L, 28990315L, 28990315L, 29038425L, 29031533L, 29026460L), OrderType = c("Sales", "Sales", "Sales", "Sales", "Sales", "Sales", "Sales", "Sales", "Sales"), LineNumber = c(4L, 46L, 28L, 23L, 2L, 1L, 10L, 1L, 1L), Quantity = c(39L, 100L, 200L, 100L, 3000L, 1500L, 100L, 30L, 14L), UnitPrice.Ftp = c("Q", "Q", "Q", "Q", "Q", "Q", "Q", "Q", "Q"), UnitPrice.Usd = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), UnitPrice.EffectiveDate = structure(c(1582008968.592, 1582008947.42, 1582008947.42, 1582008947.451, 1582008957.436, 1582008957.436, 1582008988.735, 1582008983.36, 1582009014.657 ), class = c("POSIXct", "POSIXt"), tzone = "UTC"), UnitPrice.ConvertedAmount = c(3.142, 0.708, 0.044, 0.368, 0.174, 0.397, 1.17, 0.1831, 30.22), UnitPrice.ConversionRate = c(1, 1, 1, 1, 1, 1, 1, 1, 1), UnitPrice.Currency = c("USD", "USD", "USD", "USD", "USD", "USD", "USD", "USD", "USD"), UnitPrice.Amount = c(3.142, 0.708, 0.044, 0.368, 0.174, 0.397, 1.17, 0.1831, 30.22), UnitPrice.Fact = c(1, 1, 1, 1, 1, 1, 1, 1, 1)), class = "data.frame", row.names = c(NA, -9L)), boxes = structure(list(Document.ShipmentId = c("11058187", "11058183", "11058185", "11058185", "11058191", "11058190", "11058196" ), BoxId = c(52577769L, 52576903L, 52576098L, 52576104L, 52577814L, 52577959L, 52576965L), BoxNumber = c(1L, 1L, 1L, 2L, 1L, 1L, 1L), Weight = c(0.4, 0.6, 0.95, 0.3, 0.4, 0.05, 0.9), TareWeight = c(0.2, 0.05, 0.27, 0.27, 0.2, 0.05, 0.2), CartonType = c("GZ SPECIAL", "CARRIER PACK", "XS SMART BOX", "XS SMART BOX", "GZ SPECIAL", "CARRIER PACK", "03"), Volume = c(0.3166, 0, 0.3463, 0.3463, 0.3166, 0, 0.2633), DimWeight = c(54, 1, 60, 60, 54, 1, 45), WeightUOM = c("KG", "KG", "KG", "KG", "KG", "KG", "KG"), TrackingNumber = c("295841879239", "295840702753", "295839545260", "051109917394", "295841999709", "295842158158", "295840755210" ), VolumeUOM = c("FT3", "FT3", "FT3", "FT3", "FT3", "FT3", "FT3"), Dimensions = c("70 x 16 x 8-CM", "0 x 0 x 0-CM", "35 x 35 x 8-CM", "35 x 35 x 8-CM", "70 x 16 x 8-CM", "0 x 0 x 0-CM", "23 x 18 x 18-CM")), class = "data.frame", row.names = c(NA, -7L)), prepacks = structure(list(BoxId = c(52577769L, 52576903L, 52576903L, 52576903L, 52576098L, 52576104L, 52577814L, 52577959L, 52576965L), OrderNumber = c(28937505L, 28966012L, 28966007L, 28966001L, 28990315L, 28990315L, 29038425L, 29031533L, 29026460L ), CustomerPartNumber = c("21010120001100", "LKE726C5311LF", "CI029275", "CI027108", "", "", "", "A2042007400SD", ""), SamtecPartNumber = c("ASP-175287-03", "DW-02-15-T-S-360", "ASP-65584-06", "ASP-21981-02", "IPD1-02-D", "CC79L-2024-01-L", "MMS-106-01-L-SV", "IPD1-02-D-K", "SFSD-30-28-G-20.00-DR-NDX" ), PONumber = c("4100390391", "4507354833", "4507354833", "4507354833", "202001070005", "202001070005", "202001130017", "AAAX010550", "HTR20200115025"), CountryOfOrigin = c("MY", "US", "MY", "MY", "US", "US", "CN", "US", "CN"), QtyShipped = c(39L, 200L, 100L, 100L, 1500L, 3000L, 100L, 30L, 14L), LineNumber = c(4L, 28L, 23L, 46L, 1L, 2L, 10L, 1L, 1L), CalculatedShipDate = c(NA, NA, NA, NA, NA, NA, NA, NA, NA), PrepackId = c(52394288L, 52233983L, 52433768L, 52444006L, 52402376L, 52255069L, 52447860L, 52405172L, 52266971L), PackType = c("Prepack", "Prepack", "Prepack", "Prepack", "Prepack", "Prepack", "Prepack", "Prepack", "Prepack"), GroupId = c("P32302374", "P32273371", "P32311011", "P32312799", "P32304228", "P32277008", "P32313605", "P32304830", "P32279161")), class = "data.frame", row.names = c(NA, -9L)))

rob mayoff
  • 375,296
  • 67
  • 796
  • 848
jayrythium
  • 679
  • 4
  • 11
  • 2
    Welcome to Stack Overflow! Can you please read and incorporate elements from [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example?rq=1)? Especially the aspects of using `dput()` for the input and then an explicit example of your expected dataset? – wibeasley Feb 19 '20 at 16:08
  • Whenever nested data frames emerge in a list, possibly you processed JSON files. If so, please post a sample of this file in body of text (not as an [image](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when-asking-a-question/285557#285557)). – Parfait Feb 19 '20 at 17:21
  • I apologize for that. Due to the length of the file, I have only included the first sublist the rest of them are the same structure. – jayrythium Feb 19 '20 at 18:11

1 Answers1

0

Actually, I was able to figure it out on my own. This is what I did:

shipment <- lapply(results, "[[", 1) %>% bind_rows
orders <- lapply(results, "[[", 2) %>% bind_rows
boxes<- lapply(results, "[[", 3) %>% bind_rows
prepacks <- lapply(results, "[[", 4) %>% bind_rows
jayrythium
  • 679
  • 4
  • 11