I have a foreach loop that produces a list of dataframes within the loop for each thread. It then summarises those lists into a 'large list' of lists as in the code below.
I want to find the RowMeans for each row in the 'Pdist' column across all the dataframes.
How do I access the dataframes when they are so deeply embedded in a list structure?
Here is some example data. Note the dataframes do repeat, but that is just for illustration purposes.
list_1 <- list()
dataframe_1 <- data.frame(ind_comp_a = c("OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_ePOR","OP2645ii_cPOR","OP2645ii_ePOR","OP2645ii_dPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_dPOR","OP2645ii_cPOR","OP2645ii_ePOR","OP2413iiiaMOU","OP5046___eWAT","OP2413iiicMOU","OP2413iiibMOU","OP2645ii_aPOR","OP2645ii_aPOR","OP5046___eWAT","OP5048___bPHA","OP5046___eWAT","OP2645ii_aPOR","OP5046___dWAT","OP5046___aWAT","OP5046___aWAT","OP2645ii_aPOR","OP5048___fPHA","OP2645ii_aPOR","OP5046___dWAT","OP2645ii_ePOR","OP2645ii_dPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_bPOR","OP2645ii_aPOR","OP2645ii_aPOR","OP5046___aWAT","OP2645ii_dPOR","OP5048___bPHA","OP5048___fPHA","OP5046___dWAT","OP5046___eWAT","OP5046___eWAT","OP2645ii_aPOR","OP2645ii_ePOR","OP2645ii_dPOR","OP5048___bPHA","OP2645ii_ePOR","OP2645ii_ePOR","OP2645ii_bPOR","OP2645ii_ePOR","OP2645ii_aPOR","OP5048___ePHA","OP5046___eWAT","OP2645ii_cPOR","OP2645ii_dPOR","OP2645ii_cPOR","OP5048___fPHA","OP2645ii_dPOR","OP2645ii_dPOR","OP2645ii_ePOR","OP2645ii_bPOR","OP5048___ePHA","OP5046___eWAT","OP2645ii_ePOR","OP2645ii_ePOR","OP5046___aWAT","OP2645ii_aPOR","OP5044___cMOU","OP2645ii_cPOR","OP2645ii_ePOR","OP5046___dWAT","OP2645ii_dPOR","OP5046___aWAT","OP5046___bWAT","OP2645ii_aPOR","OP2645ii_aPOR","OP5046___bWAT","OP5053DNAaPHA","OP5048___ePHA","OP2645ii_dPOR","OP5048___dPHA","OP5046___bWAT","OP5046___aWAT","OP2645ii_ePOR","OP2413iiibMOU","OP2413iiicMOU","OP2645ii_dPOR","OP5044___cMOU","OP2645ii_bPOR","OP2645ii_aPOR","OP2413iiiaMOU","OP2645ii_dPOR","OP5046___bWAT","OP5046___dWAT","OP2645ii_aPOR","OP5048___bPHA","OP5051DNAbCOM","OP5046___dWAT","OP2413iiibMOU","OP2413iiicMOU","OP2645ii_bPOR","OP5049___bWAT","OP5046___aWAT","OP2413iiiaMOU","OP5046___cWAT","OP5046___bWAT","OP5046___bWAT","OP2645ii_dPOR","OP2645ii_bPOR","OP5043___aWAT","OP5048___fPHA","OP2645ii_dPOR","OP5046___bWAT","OP5046___eWAT","OP5048___hPHA","OP5046___bWAT","OP5048___hPHA","OP2645ii_ePOR","OP5048___cPHA","OP5046___cWAT","OP5048___ePHA","OP5048___ePHA","OP5046___bWAT","OP5046___cWAT","OP2645ii_aPOR","OP2645ii_ePOR","OP2645ii_aPOR","OP5048___bPHA","OP5048___cPHA","OP5043___bWAT","OP5046___dWAT","OP5048___hPHA","OP2645ii_cPOR","OP5048___fPHA","OP5048___bPHA","OP2645ii_dPOR","OP2645ii_bPOR","OP5048___dPHA","OP5053DNAaPHA","OP5048___fPHA","OP2645ii_aPOR","OP2645ii_ePOR","OP5044___cMOU","OP5046___eWAT","OP2645ii_bPOR","OP2645ii_bPOR","OP5048___fPHA","OP5044___cMOU","OP2645ii_ePOR"),
ind_comp_b = c("OP5048___bPHA","OP5051DNAbCOM","OP5046___bWAT","OP5048___fPHA","OP5043___bWAT","OP5043___aWAT","OP5047___bPHA","OP5052DNAaWAT","OP5053DNAcPHA","OP5048___ePHA","OP5049___aWAT","OP5046___cWAT","OP5053DNAaPHA","OP5046___eWAT","OP5044___aMOU","OP5051DNAaCOM","OP5048___cPHA","OP5048___gPHA","OP5054DNAbMOU","OP5048___bPHA","OP5048___hPHA","OP5047___aPHA","OP5053DNAbPHA","OP5051DNAcCOM","OP5048___fPHA","OP5046___aWAT","OP5048___bPHA","OP5049___bWAT","OP5048___fPHA","OP5048___bPHA","OP5048___ePHA","OP5044___bMOU","OP3088i__aPOR","OP5046___dWAT","OP5048___fPHA","OP5054DNAcMOU","OP5048___ePHA","OP2645ii_cPOR","OP5048___fPHA","OP2645ii_cPOR","OP2645ii_cPOR","OP5051DNAbCOM","OP5053DNAaPHA","OP5048___bPHA","OP5054DNAaMOU","OP5048___ePHA","OP5043___aWAT","OP5048___bPHA","OP5048___bPHA","OP5048___fPHA","OP5046___bWAT","OP5054DNAaMOU","OP5043___bWAT","OP5048___fPHA","OP5053DNAaPHA","OP5048___ePHA","OP5048___cPHA","OP5044___cMOU","OP5048___bPHA","OP5048___hPHA","OP5047___bPHA","OP5048___ePHA","OP5051DNAbCOM","OP5049___bWAT","OP5049___bWAT","OP5048___ePHA","OP5053DNAaPHA","OP5048___hPHA","OP5053DNAcPHA","OP5043___aWAT","OP5046___bWAT","OP5054DNAcMOU","OP5048___cPHA","OP5048___hPHA","OP5048___fPHA","OP5051DNAbCOM","OP5047___aPHA","OP5054DNAaMOU","OP5048___cPHA","OP5048___dPHA","OP5053DNAaPHA","OP5054DNAaMOU","OP5054DNAcMOU","OP5043___aWAT","OP5043___bWAT","OP5043___bWAT","OP2645ii_cPOR","OP5049___bWAT","OP5047___aPHA","OP5047___aPHA","OP5046___bWAT","OP5053DNAaPHA","OP5052DNAaWAT","OP5048___bPHA","OP2645ii_ePOR","OP5047___bPHA","OP5053DNAaPHA","OP5047___bPHA","OP5048___hPHA","OP5048___dPHA","OP5048___gPHA","OP5049___aWAT","OP5048___ePHA","OP5054DNAaMOU","OP5054DNAcMOU","OP5048___cPHA","OP5051DNAbCOM","OP5048___fPHA","OP5048___cPHA","OP5053DNAcPHA","OP5048___bPHA","OP5048___bPHA","OP5048___hPHA","OP5048___fPHA","OP5048___ePHA","OP5053DNAbPHA","OP5048___bPHA","OP5053DNAcPHA","OP5048___hPHA","OP5048___hPHA","OP5046___cWAT","OP5048___dPHA","OP5054DNAaMOU","OP5048___cPHA","OP5048___fPHA","OP5048___fPHA","OP5051DNAbCOM","OP5053DNAaPHA","OP5047___aPHA","OP5048___fPHA","OP5048___fPHA","OP5048___cPHA","OP5048___bPHA","OP5047___aPHA","OP5046___bWAT","OP5054DNAaMOU","OP5052DNAaWAT","OP5052DNAaWAT","OP5047___aPHA","OP5048___dPHA","OP5049___bWAT","OP5054DNAaMOU","OP5054DNAaMOU","OP5048___gPHA","OP5054DNAaMOU","OP5048___bPHA","OP5051DNAbCOM","OP5052DNAaWAT","OP5053DNAaPHA","OP5048___ePHA","OP5051DNAaCOM","OP5053DNAbPHA","OP5044___aMOU","OP5051DNAcCOM","OP5049___bWAT","OP5054DNAaMOU","OP5047___aPHA","OP5051DNAbCOM","OP2645ii_dPOR","OP5051DNAcCOM","OP5052DNAaWAT","OP5049___aWAT","OP5053DNAaPHA","OP5048___fPHA","OP5054DNAcMOU","OP5051DNAbCOM","OP5054DNAbMOU","OP5052DNAaWAT","OP5048___ePHA","OP5053DNAbPHA","OP5043___bWAT","OP5043___aWAT","OP5049___aWAT","OP5051DNAbCOM","OP5049___aWAT"),
Pdist = c(0.12653736,0.12545262,0.12409420,0.12023167,0.11852507,0.11574044,0.11371805,0.11165877,0.11096499,0.11000436,0.10860921,0.10716355,0.10648404,0.10457088,0.10043985,0.10043419,0.09902992,0.09809625,0.09742466,0.09706079,0.09691789,0.09532336,0.09374877,0.09359057,0.09352572,0.09191749,0.09136457,0.08965083,0.08872891,0.08630526,0.08531594,0.08454861,0.08453494,0.08312192,0.08258318,0.08140542,0.08140466,0.08083571,0.08036883,0.07964833,0.07964736,0.07930556,0.07916955,0.07909909,0.07871759,0.07749702,0.07735318,0.07692221,0.07663146,0.07655228,0.07610728,0.07601355,0.07589804,0.07586683,0.07475816,0.07427158,0.07295387,0.07264578,0.07239881,0.07239652,0.07230148,0.07213147,0.07178486,0.07143912,0.07102923,0.07034595,0.07017927,0.07009262,0.06990277,0.06953688,0.06945218,0.06933059,0.06923690,0.06918330,0.06905105,0.06894675,0.06886782,0.06873706,0.06835633,0.06827398,0.06818929,0.06815169,0.06781528,0.06755839,0.06709807,0.06673160,0.06651507,0.06631521,0.06577319,0.06527915,0.06521944,0.06479374,0.06450183,0.06444880,0.06439217,0.06363232,0.06313289,0.06312447,0.06301823,0.06299480,0.06277461,0.06277369,0.06274871,0.06205441,0.06190890,0.06190525,0.06183778,0.06180255,0.06174675,0.06142775,0.06142015,0.06141977,0.06132026,0.06126746,0.06121289,0.06106807,0.06069853,0.06060409,0.06057873,0.06002828,0.05988876,0.05983741,0.05952482,0.05916929,0.05912005,0.05911979,0.05906816,0.05899453,0.05865145,0.05853252,0.05818659,0.05785562,0.05784148,0.05781387,0.05760903,0.05755058,0.05742954,0.05731918,0.05701451,0.05701384,0.05698890,0.05686745,0.05665475,0.05662290,0.05661457,0.05648999,0.05641717,0.05638154,0.05633743,0.05630275,0.05624860,0.05594854,0.05594397,0.05581496,0.05577077,0.05576073,0.05571763,0.05552730,0.05545187,0.05541380,0.05508725,0.05495578,0.05481013,0.05478274,0.05476202,0.05470291,0.05452429,0.05403781,0.05369966,0.05355532,0.05337705,0.05334701,0.05318317,0.05289062,0.05281420))
list_1[[1]] <- dataframe1
dataframe2 <- data.frame(ind_comp_a = c("OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_ePOR","OP2645ii_cPOR","OP2645ii_ePOR","OP2645ii_dPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_cPOR","OP2645ii_dPOR","OP2645ii_cPOR","OP2645ii_ePOR","OP2413iiiaMOU","OP5046___eWAT","OP2413iiicMOU","OP2413iiibMOU","OP2645ii_aPOR","OP2645ii_aPOR","OP5046___eWAT","OP5048___bPHA","OP5046___eWAT","OP2645ii_aPOR","OP5046___dWAT","OP5046___aWAT","OP5046___aWAT","OP2645ii_aPOR","OP5048___fPHA","OP2645ii_aPOR","OP5046___dWAT","OP2645ii_ePOR","OP2645ii_dPOR","OP2645ii_aPOR","OP2645ii_cPOR","OP2645ii_bPOR","OP2645ii_aPOR","OP2645ii_aPOR","OP5046___aWAT","OP2645ii_dPOR","OP5048___bPHA","OP5048___fPHA","OP5046___dWAT","OP5046___eWAT","OP5046___eWAT","OP2645ii_aPOR","OP2645ii_ePOR","OP2645ii_dPOR","OP5048___bPHA","OP2645ii_ePOR","OP2645ii_ePOR","OP2645ii_bPOR","OP2645ii_ePOR","OP2645ii_aPOR","OP5048___ePHA","OP5046___eWAT","OP2645ii_cPOR","OP2645ii_dPOR","OP2645ii_cPOR","OP5048___fPHA","OP2645ii_dPOR","OP2645ii_dPOR","OP2645ii_ePOR","OP2645ii_bPOR","OP5048___ePHA","OP5046___eWAT","OP2645ii_ePOR","OP2645ii_ePOR","OP5046___aWAT","OP2645ii_aPOR","OP5044___cMOU","OP2645ii_cPOR","OP2645ii_ePOR","OP5046___dWAT","OP2645ii_dPOR","OP5046___aWAT","OP5046___bWAT","OP2645ii_aPOR","OP2645ii_aPOR","OP5046___bWAT","OP5053DNAaPHA","OP5048___ePHA","OP2645ii_dPOR","OP5048___dPHA","OP5046___bWAT","OP5046___aWAT","OP2645ii_ePOR","OP2413iiibMOU","OP2413iiicMOU","OP2645ii_dPOR","OP5044___cMOU","OP2645ii_bPOR","OP2645ii_aPOR","OP2413iiiaMOU","OP2645ii_dPOR","OP5046___bWAT","OP5046___dWAT","OP2645ii_aPOR","OP5048___bPHA","OP5051DNAbCOM","OP5046___dWAT","OP2413iiibMOU","OP2413iiicMOU","OP2645ii_bPOR","OP5049___bWAT","OP5046___aWAT","OP2413iiiaMOU","OP5046___cWAT","OP5046___bWAT","OP5046___bWAT","OP2645ii_dPOR","OP2645ii_bPOR","OP5043___aWAT","OP5048___fPHA","OP2645ii_dPOR","OP5046___bWAT","OP5046___eWAT","OP5048___hPHA","OP5046___bWAT","OP5048___hPHA","OP2645ii_ePOR","OP5048___cPHA","OP5046___cWAT","OP5048___ePHA","OP5048___ePHA","OP5046___bWAT","OP5046___cWAT","OP2645ii_aPOR","OP2645ii_ePOR","OP2645ii_aPOR","OP5048___bPHA","OP5048___cPHA","OP5043___bWAT","OP5046___dWAT","OP5048___hPHA","OP2645ii_cPOR","OP5048___fPHA","OP5048___bPHA","OP2645ii_dPOR","OP2645ii_bPOR","OP5048___dPHA","OP5053DNAaPHA","OP5048___fPHA","OP2645ii_aPOR","OP2645ii_ePOR","OP5044___cMOU","OP5046___eWAT","OP2645ii_bPOR","OP2645ii_bPOR","OP5048___fPHA","OP5044___cMOU","OP2645ii_ePOR"),
ind_comp_b = c("OP5048___bPHA","OP5051DNAbCOM","OP5046___bWAT","OP5048___fPHA","OP5043___bWAT","OP5043___aWAT","OP5047___bPHA","OP5052DNAaWAT","OP5053DNAcPHA","OP5048___ePHA","OP5049___aWAT","OP5046___cWAT","OP5053DNAaPHA","OP5046___eWAT","OP5044___aMOU","OP5051DNAaCOM","OP5048___cPHA","OP5048___gPHA","OP5054DNAbMOU","OP5048___bPHA","OP5048___hPHA","OP5047___aPHA","OP5053DNAbPHA","OP5051DNAcCOM","OP5048___fPHA","OP5046___aWAT","OP5048___bPHA","OP5049___bWAT","OP5048___fPHA","OP5048___bPHA","OP5048___ePHA","OP5044___bMOU","OP3088i__aPOR","OP5046___dWAT","OP5048___fPHA","OP5054DNAcMOU","OP5048___ePHA","OP2645ii_cPOR","OP5048___fPHA","OP2645ii_cPOR","OP2645ii_cPOR","OP5051DNAbCOM","OP5053DNAaPHA","OP5048___bPHA","OP5054DNAaMOU","OP5048___ePHA","OP5043___aWAT","OP5048___bPHA","OP5048___bPHA","OP5048___fPHA","OP5046___bWAT","OP5054DNAaMOU","OP5043___bWAT","OP5048___fPHA","OP5053DNAaPHA","OP5048___ePHA","OP5048___cPHA","OP5044___cMOU","OP5048___bPHA","OP5048___hPHA","OP5047___bPHA","OP5048___ePHA","OP5051DNAbCOM","OP5049___bWAT","OP5049___bWAT","OP5048___ePHA","OP5053DNAaPHA","OP5048___hPHA","OP5053DNAcPHA","OP5043___aWAT","OP5046___bWAT","OP5054DNAcMOU","OP5048___cPHA","OP5048___hPHA","OP5048___fPHA","OP5051DNAbCOM","OP5047___aPHA","OP5054DNAaMOU","OP5048___cPHA","OP5048___dPHA","OP5053DNAaPHA","OP5054DNAaMOU","OP5054DNAcMOU","OP5043___aWAT","OP5043___bWAT","OP5043___bWAT","OP2645ii_cPOR","OP5049___bWAT","OP5047___aPHA","OP5047___aPHA","OP5046___bWAT","OP5053DNAaPHA","OP5052DNAaWAT","OP5048___bPHA","OP2645ii_ePOR","OP5047___bPHA","OP5053DNAaPHA","OP5047___bPHA","OP5048___hPHA","OP5048___dPHA","OP5048___gPHA","OP5049___aWAT","OP5048___ePHA","OP5054DNAaMOU","OP5054DNAcMOU","OP5048___cPHA","OP5051DNAbCOM","OP5048___fPHA","OP5048___cPHA","OP5053DNAcPHA","OP5048___bPHA","OP5048___bPHA","OP5048___hPHA","OP5048___fPHA","OP5048___ePHA","OP5053DNAbPHA","OP5048___bPHA","OP5053DNAcPHA","OP5048___hPHA","OP5048___hPHA","OP5046___cWAT","OP5048___dPHA","OP5054DNAaMOU","OP5048___cPHA","OP5048___fPHA","OP5048___fPHA","OP5051DNAbCOM","OP5053DNAaPHA","OP5047___aPHA","OP5048___fPHA","OP5048___fPHA","OP5048___cPHA","OP5048___bPHA","OP5047___aPHA","OP5046___bWAT","OP5054DNAaMOU","OP5052DNAaWAT","OP5052DNAaWAT","OP5047___aPHA","OP5048___dPHA","OP5049___bWAT","OP5054DNAaMOU","OP5054DNAaMOU","OP5048___gPHA","OP5054DNAaMOU","OP5048___bPHA","OP5051DNAbCOM","OP5052DNAaWAT","OP5053DNAaPHA","OP5048___ePHA","OP5051DNAaCOM","OP5053DNAbPHA","OP5044___aMOU","OP5051DNAcCOM","OP5049___bWAT","OP5054DNAaMOU","OP5047___aPHA","OP5051DNAbCOM","OP2645ii_dPOR","OP5051DNAcCOM","OP5052DNAaWAT","OP5049___aWAT","OP5053DNAaPHA","OP5048___fPHA","OP5054DNAcMOU","OP5051DNAbCOM","OP5054DNAbMOU","OP5052DNAaWAT","OP5048___ePHA","OP5053DNAbPHA","OP5043___bWAT","OP5043___aWAT","OP5049___aWAT","OP5051DNAbCOM","OP5049___aWAT"),
Pdist = c(0.12653736,0.12545262,0.12409420,0.12023167,0.11852507,0.11574044,0.11371805,0.11165877,0.11096499,0.11000436,0.10860921,0.10716355,0.10648404,0.10457088,0.10043985,0.10043419,0.09902992,0.09809625,0.09742466,0.09706079,0.09691789,0.09532336,0.09374877,0.09359057,0.09352572,0.09191749,0.09136457,0.08965083,0.08872891,0.08630526,0.08531594,0.08454861,0.08453494,0.08312192,0.08258318,0.08140542,0.08140466,0.08083571,0.08036883,0.07964833,0.07964736,0.07930556,0.07916955,0.07909909,0.07871759,0.07749702,0.07735318,0.07692221,0.07663146,0.07655228,0.07610728,0.07601355,0.07589804,0.07586683,0.07475816,0.07427158,0.07295387,0.07264578,0.07239881,0.07239652,0.07230148,0.07213147,0.07178486,0.07143912,0.07102923,0.07034595,0.07017927,0.07009262,0.06990277,0.06953688,0.06945218,0.06933059,0.06923690,0.06918330,0.06905105,0.06894675,0.06886782,0.06873706,0.06835633,0.06827398,0.06818929,0.06815169,0.06781528,0.06755839,0.06709807,0.06673160,0.06651507,0.06631521,0.06577319,0.06527915,0.06521944,0.06479374,0.06450183,0.06444880,0.06439217,0.06363232,0.06313289,0.06312447,0.06301823,0.06299480,0.06277461,0.06277369,0.06274871,0.06205441,0.06190890,0.06190525,0.06183778,0.06180255,0.06174675,0.06142775,0.06142015,0.06141977,0.06132026,0.06126746,0.06121289,0.06106807,0.06069853,0.06060409,0.06057873,0.06002828,0.05988876,0.05983741,0.05952482,0.05916929,0.05912005,0.05911979,0.05906816,0.05899453,0.05865145,0.05853252,0.05818659,0.05785562,0.05784148,0.05781387,0.05760903,0.05755058,0.05742954,0.05731918,0.05701451,0.05701384,0.05698890,0.05686745,0.05665475,0.05662290,0.05661457,0.05648999,0.05641717,0.05638154,0.05633743,0.05630275,0.05624860,0.05594854,0.05594397,0.05581496,0.05577077,0.05576073,0.05571763,0.05552730,0.05545187,0.05541380,0.05508725,0.05495578,0.05481013,0.05478274,0.05476202,0.05470291,0.05452429,0.05403781,0.05369966,0.05355532,0.05337705,0.05334701,0.05318317,0.05289062,0.05281420))
list_1[[2]] <- dataframe2
list_1[[3]] <- dataframe1
list_1[[4]] <- dataframe2
list_2 <- list()
list_2[[1]] <- dataframe1
list_2[[2]] <- dataframe2
list_2[[3]] <- dataframe1
list_2[[4]] <- dataframe2
Large_list <- list(list_1,list_2)
Many Thanks.
Cheers.
Deon
From my understanding you want the row means for the "Pdist" column in dataframes in a nested list with two levels (dataframes being in the second level). In that case, you can do:
rowMeans(do.call(cbind, lapply(unlist(Large_list, recursive = F), `[[`, "Pdist")))
Use unlist() w/ recursive = FALSE to make remove a level and
Use lapply() to extract the "Pdist" columns,
Usedo.call() with cbind() to bind them together
Then rowMeans()