I have a large list made up of ten lists. I would like to remove lists that have zeroes in all the cells for a specific element.
Here is my big_list:
> dput(big_list)
list(Zm00001eb000210_T001_1 = structure(list(uORF = c("Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1", "Zm00001eb000210_T001_1",
"Zm00001eb000210_T001_1"), sample = c("1Leaf1", "1Leaf2", "1Root1",
"1Root2", "3Leaf1", "3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2",
"Embryo15_1", "Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2", "Root1",
"Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1", "SAM_V1_2",
"SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2", "Seedling6DAS1",
"Seedling6DAS2", "Stem1", "Stem2", "Tassel1", "Tassel2", "Tassel1cm1",
"Tassel1cm2", "TopLeaf1", "TopLeaf2"), uORF.counts = c(0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11.4347855154007, 0, 0, 0,
0, 33.3338244380922, 0, 0, 0, 361.143298701066, 0, 0, 0, 0, 0,
0, 0, 73.9301306725009, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
mORF.counts = c(0, 0, 0, 0.343544763388441, 0, 0, 0.0760966486956441,
0.0989407598144533, 0.104551293297911, 0.685769475329068,
0.438970125615888, 0.183828153543562, 0.0492631332412111,
0, 0.284960191689523, 0.414532526807716, 0.755067264729411,
0.415271301202561, 0.962658543958137, 0.253064810686685,
0, 0.288839940994747, 0, 0, 0.075966119209846, 0, 0, 0.0859279434500381,
0.111113029385815, 0.337618989220899, 0.19244911952294, 0.885797519484353,
0.0577068647184253, 1.0274385206843, 0.170047092744869, 0.200225443771896,
0.07452871786933, 0, 0.424885586034637, 0.149978447560262,
0.291650426819245, 0.150791469374745, 0.185266040760669,
0)), row.names = c(NA, -44L), class = c("tbl_df", "tbl",
"data.frame")), Zm00001eb000210_T002_9 = structure(list(uORF = c("Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9", "Zm00001eb000210_T002_9",
"Zm00001eb000210_T002_9"), sample = c("1Leaf1", "1Leaf2", "1Root1",
"1Root2", "3Leaf1", "3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2",
"Embryo15_1", "Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2", "Root1",
"Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1", "SAM_V1_2",
"SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2", "Seedling6DAS1",
"Seedling6DAS2", "Stem1", "Stem2", "Tassel1", "Tassel2", "Tassel1cm1",
"Tassel1cm2", "TopLeaf1", "TopLeaf2"), uORF.counts = c(0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11.4347855154007, 0, 0, 0,
0, 33.3338244380922, 0, 0, 0, 361.143298701066, 0, 0, 0, 0, 0,
0, 0, 73.9301306725009, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
mORF.counts = c(0, 0, 0, 0.365321371340932, 0, 0, 0.0809202613998489,
0.105212414534932, 0.111178588392205, 0.72923901584173, 0.466795554343452,
0.19548064852228, 0.0523858236543152, 0, 0.303023242091701,
0.440808905556183, 0.802929452001876, 0.441594509366221,
1.02367952270084, 0.172996764026799, 0, 0.307148920861081,
0, 0, 0.0807814579138581, 0, 0, 0.0913747420512427, 0.118156259663823,
0.239346649553322, 0.204648080104722, 0.941946433287732,
0.0613647861978446, 1.09256577117576, 0.180826034142905,
0.212917329825197, 0.0792529426085881, 0, 0.395340946240699,
0.159485278115995, 0.310137557699591, 0.160349835739483,
0.197009680502875, 0)), row.names = c(NA, -44L), class = c("tbl_df",
"tbl", "data.frame")), Zm00001eb000340_T001_1 = structure(list(
uORF = c("Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1",
"Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1", "Zm00001eb000340_T001_1"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), mORF.counts = c(15.9577310906664,
10.9721879068452, 15.2545295583641, 14.9610683447621, 13.7407553130073,
15.0898218275324, 8.8167202339968, 11.4182721224643, 32.2090774974947,
24.7489457541728, 27.3602274978775, 24.0092443355057, 25.8635736817635,
15.4492008332927, 16.5820101656358, 15.7123804255646, 14.309979727866,
16.0334218643644, 30.8346128127823, 26.5095614564813, 22.0153898488796,
21.4012979695502, 5.60652347398228, 3.61049607609657, 12.9573391538621,
11.9844233034174, 3.68099341662474, 20.9712701215337, 21.670386860971,
23.8243155365058, 24.483348273863, 21.1824657296363, 6.86443842289814,
4.55726253082638, 10.3881296800559, 14.4519953855864, 12.3335051788672,
10.2054007660267, 14.6485160508083, 14.673033890032, 32.7720159395946,
25.112060164431, 8.35765398911196, 8.10490776009202)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")), Zm00001eb000340_T002_1 = structure(list(
uORF = c("Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1",
"Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1", "Zm00001eb000340_T002_1"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), mORF.counts = c(15.9775954862149,
10.9858462320404, 15.2735185993082, 14.9796920812908, 13.7578599876708,
15.1086058381061, 8.82769540441256, 11.4324857392142, 32.2491717848359,
24.7797535704643, 27.3942858723561, 24.0391313616495, 25.8957690016993,
15.4684322036246, 16.6026516720661, 15.7319394053474, 14.3277929806393,
16.0533804807931, 30.8729961482339, 26.5425609105765, 22.042794898484,
21.4279385894293, 5.61350254884616, 3.61499046955229, 12.9734686216885,
11.9993416726748, 3.68557556610601, 20.9973754370377, 21.6973624462751,
23.8539723608251, 24.5138254708844, 21.2088339442375, 6.87298336699304,
4.56293547173612, 10.4010609618153, 14.469985421336, 12.3488580898782,
10.2181045844076, 14.6667507180915, 14.691299077447, 32.8128109801833,
25.1433199903619, 8.3680577077706, 8.11499685688881)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")), Zm00001eb000470_T001_1 = structure(list(
uORF = c("Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1",
"Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1", "Zm00001eb000470_T001_1"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 83.4955169709039, 0, 0, 0, 0, 0, 28.7464807043411,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11.2406460145824, 0, 21.4246067462734,
3.79467228769529, 0, 15.7018825522203, 18.5389127807478,
0, 0, 27.5534687981229, 2.40281615863606, 0, 0, 0, 0, 0,
0, 18.6624163966679, 0, 101.319692897418, 0, 18.1722085926888,
0, 0, 121.429685770491, 23.4813161069057), mORF.counts = c(2.78678991038632,
5.23135534859068, 0, 0, 0, 0.662658150794125, 0.409637837791766,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0729792711316374, 0.386564992374038,
0.534483728988032, 0, 1.37526811341663, 0.766753464638798,
0.485803306586024, 0, 0.607111227010591, 0.822436205751297,
0, 0, 0.621959939713711, 1.28140367859192, 0, 0, 0, 1.80538860963132,
0.532192947104563, 0.804098175333964, 1.09749529429666, 0,
0, 0.934978514834704, 1.40080302886771)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")), Zm00001eb000470_T001_2 = structure(list(
uORF = c("Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2",
"Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2", "Zm00001eb000470_T001_2"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25.7804563635811, 0), mORF.counts = c(2.78678991038632,
5.23135534859068, 0, 0, 0, 0.662658150794125, 0.409637837791766,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0729792711316374, 0.386564992374038,
0.534483728988032, 0, 1.37526811341663, 0.766753464638798,
0.485803306586024, 0, 0.607111227010591, 0.822436205751297,
0, 0, 0.621959939713711, 1.28140367859192, 0, 0, 0, 1.80538860963132,
0.532192947104563, 0.804098175333964, 1.09749529429666, 0,
0, 0.934978514834704, 1.40080302886771)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")), Zm00001eb000470_T001_3 = structure(list(
uORF = c("Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3",
"Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3", "Zm00001eb000470_T001_3"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 147.722837717753, 0, 0, 0, 0, 0, 50.8591581692189,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19.8872967950304, 0, 54.1501049631087,
6.71365097053781, 0, 27.7802537462358, 32.7996149197846,
0, 0, 64.9979263955721, 4.25113628066379, 0, 0, 0, 0, 0,
0, 33.0181213171818, 14.1747578900174, 179.257918203124,
15.7804228950156, 85.7355482321728, 0, 0, 214.837136363176,
49.852640350046), mORF.counts = c(2.78678991038632, 5.23135534859068,
0, 0, 0, 0.662658150794125, 0.409637837791766, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0729792711316374, 0.386564992374038,
0.534483728988032, 0, 1.37526811341663, 0.766753464638798,
0.485803306586024, 0, 0.607111227010591, 0.822436205751297,
0, 0, 0.621959939713711, 1.28140367859192, 0, 0, 0, 1.80538860963132,
0.532192947104563, 0.804098175333964, 1.09749529429666, 0,
0, 0.934978514834704, 1.40080302886771)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")), Zm00001eb000470_T001_4 = structure(list(
uORF = c("Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4",
"Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4", "Zm00001eb000470_T001_4"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 125.243275456356, 0, 0, 0, 0, 41.8068094051703,
45.9943691269458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.06065810661049,
3.79467228769529, 0, 0, 0, 144.251178847067, 0, 36.7379583974973,
4.80563231727211, 11.8552123025014, 0, 0, 190.042200283117,
0, 0, 24.8832218622239, 52.0768279002814, 55.2652870349554,
8.91936946240015, 24.2296114569184, 0, 0, 14.5715622924589,
4.69626322138114), mORF.counts = c(2.78678991038632, 5.23135534859068,
0, 0, 0, 0.662658150794125, 0.409637837791766, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.0729792711316374, 0.386564992374038,
0.534483728988032, 0, 1.37526811341663, 0.766753464638798,
0.485803306586024, 0, 0.607111227010591, 0.822436205751297,
0, 0, 0.621959939713711, 1.28140367859192, 0, 0, 0, 1.80538860963132,
0.532192947104563, 0.804098175333964, 1.09749529429666, 0,
0, 0.934978514834704, 1.40080302886771)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")), Zm00001eb000590_T001_1 = structure(list(
uORF = c("Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1",
"Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1", "Zm00001eb000590_T001_1"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), mORF.counts = c(14.0225801608805,
8.81519572796751, 10.0842351029196, 13.8771566804707, 7.11530150881452,
13.4925500827389, 3.63109781853219, 5.34284426702046, 10.1135671840607,
9.47665487265555, 2.68865205489207, 5.60173788500298, 5.09702999415875,
3.37328874561412, 4.93713195264232, 4.13826302736584, 5.49684769183169,
4.37755081503468, 14.148327878666, 12.489660767776, 11.3239110681831,
13.8337256590664, 0, 1.93118494003443, 9.69024480583571,
13.2171759049679, 8.54861027025474, 8.76878078126128, 10.5908197277331,
11.2186115309571, 11.5243102210465, 8.67912706842305, 2.8626471638543,
3.34931488046525, 6.62787339274703, 8.51359170240591, 6.12666229313586,
4.4305298183051, 3.76378072843866, 5.553380764842, 13.0210338773437,
12.2890105358246, 7.25388065238328, 6.07069762787997)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")), Zm00001eb000590_T001_2 = structure(list(
uORF = c("Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2",
"Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2", "Zm00001eb000590_T001_2"
), sample = c("1Leaf1", "1Leaf2", "1Root1", "1Root2", "3Leaf1",
"3Leaf2", "Ear1", "Ear2", "Ear5mm_1", "Ear5mm_2", "Embryo15_1",
"Embryo15_2", "Embryo20_1", "Embryo20_2", "Endosperm15_1",
"Endosperm15_2", "Endosperm20_1", "Endosperm20_2", "Inflorescence1",
"Inflorescence2", "Kernel1", "Kernel2", "Leaf1", "Leaf2",
"Root1", "Root2", "Root6DAS_1", "Root6DAS_2", "SAM_V1_1",
"SAM_V1_2", "SAM_V3_1", "SAM_V3_2", "Seedling1", "Seedling2",
"Seedling6DAS1", "Seedling6DAS2", "Stem1", "Stem2", "Tassel1",
"Tassel2", "Tassel1cm1", "Tassel1cm2", "TopLeaf1", "TopLeaf2"
), uORF.counts = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), mORF.counts = c(14.0225801608805,
8.81519572796751, 10.0842351029196, 13.8771566804707, 7.11530150881452,
13.4925500827389, 3.63109781853219, 5.34284426702046, 10.1135671840607,
9.47665487265555, 2.68865205489207, 5.60173788500298, 5.09702999415875,
3.37328874561412, 4.93713195264232, 4.13826302736584, 5.49684769183169,
4.37755081503468, 14.148327878666, 12.489660767776, 11.3239110681831,
13.8337256590664, 0, 1.93118494003443, 9.69024480583571,
13.2171759049679, 8.54861027025474, 8.76878078126128, 10.5908197277331,
11.2186115309571, 11.5243102210465, 8.67912706842305, 2.8626471638543,
3.34931488046525, 6.62787339274703, 8.51359170240591, 6.12666229313586,
4.4305298183051, 3.76378072843866, 5.553380764842, 13.0210338773437,
12.2890105358246, 7.25388065238328, 6.07069762787997)), row.names = c(NA,
-44L), class = c("tbl_df", "tbl", "data.frame")))
I would like to remove lists inside the big list that have all zeroes for uORF.counts e.g., Zm00001eb000340_T001_1, Zm00001eb000340_T002_1, Zm00001eb000590_T001_1, and Zm00001eb000590_T001_2.
Thanks,
Stef
>Solution :
One base R approach is to use lapply to create a boolean vector that indicates if the counts all equal 0, and then [index] the list off of that:
All in one go:
big_list[unlist(lapply(big_list, function(x) sum(x[, "uORF.counts"]) > 0))]
Or in more bite-sized terms for easier understanding of what’s going on:
all0 <- unlist(lapply(big_list, function(x) sum(x[, "uORF.counts"]) > 0))
#> unname(all0)
# [1] TRUE TRUE FALSE FALSE TRUE TRUE TRUE TRUE FALSE FALSE
big_list[all0]