I applied an analysis across 17 cancer datasets. This analysis extracts the most important genes in those datasets and stores them in dataframes, along with p-values and log fold change. Since I have 17 datasets, I have 17 different dataframes containing those genes. The gene names are stored as rownames. I'll dput an example.
I want to make a bar chart, so that the names of the reccurent genes would be in the x axis, and the y axis shows in how many datasets those genes appear.
I drew an example of what I want more or less, it's easier to understand what I'm trying to do. Here, GeneA appears in two datasets (out of the 17), GeneB appears in five, and so on..

And this is a sample, from one of the dataframes containing the important genes:
structure(list(logFC = c(0.685619610367974, 1.02911399977095,
1.21579832342335, 0.841748375326278, -0.95542189916311, -0.622394818631047,
-1.09930985256326, -0.690554417934163, -1.07611805007749, -0.948645964224887,
-1.19079386783244, -0.756831495690092, -1.31779396563897, -0.924931124917402,
0.643565666416337, -1.53363592483325, -1.32984685582547, -1.51833806458711,
-1.27482926851119, -0.646054648595126, 0.730157851421398, -1.35025872065137,
-0.541002828858919, 0.99837288668516, -1.5943393059336, -2.98196115973334,
-1.12356324822189, 0.824177500735602, -0.474657933885741, -1.03495843655562
), AveExpr = c(5.05747198914854, 7.75940716840556, 3.8862859573242,
6.45085792154631, 4.43329710921497, 4.69052583450353, 5.22118708978412,
4.01613055295418, 4.69525023673379, 5.09372142578403, 5.14270112479785,
3.63232072961097, 5.69808136458236, 4.15064883311976, 6.26413864971108,
2.5581138769371, 2.90910253040127, 2.41800584482312, 3.43553185874516,
7.03837991758644, 6.46936113235691, 2.67724307365115, 4.99684831009086,
6.82992552495244, 1.30882233740874, -2.28529840100659, 3.07710437824841,
6.28691890035385, 5.2405192106965, 2.5561726432035), t = c(4.20511802882062,
3.97430617985228, 4.18461388788438, 3.75065833089504, -3.74904828469963,
-3.69125356189902, -3.63103195286571, -3.59655040997674, -3.52954054833831,
-3.4712282871982, -3.45812015299906, -3.52003442282881, -3.44172287211435,
-3.46589605541631, 3.42058503629755, -3.54504837781242, -3.52836396936311,
-3.54667074361479, -3.41439156856387, -3.34450445379578, 3.33286553107132,
-3.46154088027199, -3.32150382065004, 3.30509454726963, -3.65100886393021,
-4.47839052350898, -3.3738507671459, 3.25825505673401, -3.2593854571864,
-3.41466969858952), P.Value = c(0.000106021402821303, 0.000223806789211493,
0.000113375581956081, 0.000453594412082253, 0.000455876454295666,
0.000545499225012084, 0.000656761966844333, 0.000729929667865844,
0.000894998135798265, 0.00106709947324608, 0.00110991114624083,
0.000921121368589992, 0.00116576947504538, 0.00108432150993663,
0.00124172990454849, 0.000853893040602941, 0.000898192669499512,
0.000849698463021537, 0.0012648632706601, 0.00155592601730215,
0.00161018547122856, 0.00109858387680183, 0.00166487844680117,
0.00174698324894766, 0.000617640897128276, 4.28624781124686e-05,
0.00142670855222148, 0.00200294162363801, 0.00199636736769239,
0.00126381569483115), adj.P.Val = c(0.491114677138253, 0.553985748095362,
0.491114677138253, 0.642128989508303, 0.642128989508303, 0.642128989508303,
0.642128989508303, 0.642128989508303, 0.642128989508303, 0.642128989508303,
0.642128989508303, 0.642128989508303, 0.642128989508303, 0.642128989508303,
0.642128989508303, 0.642128989508303, 0.642128989508303, 0.642128989508303,
0.642128989508303, 0.642128989508303, 0.642128989508303, 0.642128989508303,
0.642128989508303, 0.642128989508303, 0.642128989508303, 0.491114677138253,
0.642128989508303, 0.642128989508303, 0.642128989508303, 0.642128989508303
), B = c(0.864951243823227, 0.43558162271344, 0.179475533728334,
-0.162935279147593, -0.230345274467081, -0.364440984772641, -0.468609367293149,
-0.680242692703549, -0.74700189253372, -0.868687025452187, -0.897619983658367,
-0.923461454055463, -0.930910276805026, -0.959121075652368, -0.990427578949439,
-0.995826555677875, -1.00570839987277, -1.09301618043057, -1.14138893444917,
-1.166925812266, -1.19887366135859, -1.20643698734222, -1.24279579981017,
-1.26418840296138, -1.26951050271089, -1.32756343917141, -1.34169073363162,
-1.38132958268032, -1.38305582586065, -1.40684725754031)), row.names = c("FLCN",
"PMP22", "MEIS3P1", "ABCC5", "ZBTB18", "MTM1", "DOCK11", "TNFAIP8L1",
"MMD", "HIVEP2", "ANTXR2", "PHLPP2", "BMS1P20", "NMT2", "TCEAL9",
"IL2RA", "MAP4K1", "NR2F1", "CD28", "UBE2J1", "ENTPD6", "AMIGO2",
"RNGTT", "KIF13A", "BMP6", "GPR88", "HDAC9", "MARVELD1", "STYX",
"DGKE"), class = "data.frame")
NOTE - there might be too many reccurent genes. In that case, is there any way to pick the top 20 genes for example? like the 20 genes that appear the most across those dataframes.
Thanks!!