- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我似乎无法正确地将我的列表绑定(bind)在一起。
我试过:
purrr::map(myList, ~dplyr::bind_rows(.))
Error: Argument 1 must have names
这是行不通的。
purrr::map(myList, ~plyr::ldply(.))
哪个“看起来”有效但没有给我正确的值。当我运行时:
library(dplyr)
purrr::map(myList, ~plyr::ldply(.) %>%
distinct(protocol_active))
我得到以下输出:
[[1]]
protocol_active
1 0.4766905
2 0.4277574
3 0.3365723
4 0.4572180
5 0.2857566
6 0.3282195
7 0.3178228
8 0.5150016
9 0.5812856
10 0.4742427
[[2]]
protocol_active
1 0
但是在列表 [[2]][[6]]
中我得到以下内容:
myList[[2]][[6]]
protocol_active wind holiday temp
0.609327860 0.456351664 0.148564432 0.14033729
protocol_active
的值 > 0,但是当我运行 distinct()
时,它告诉我列表 [[2]]
只有hae 0
作为它的唯一值。
我在这里做错了什么?
数据:
myList <- list(list(c(protocol_active = 0.476690486794737, wind = 0.421644905580702,
holiday = 0.237855180468597, month_10 = 0.174138672609035, month_8 = 0.146189977753241,
temp = 0.136091939119292, month_11 = 0.117059004222591, humidity = 0.0981068528147208,
weekday = 0.0936421424983979, month_1 = 0.075759335979394, text_scattered_clouds = 0.0714021764373941,
month_4 = 0.0458588632888939, month_3 = 0.044565083971885, month_12 = 0.0400631134202661,
month_7 = 0.0396780361927733, month_9 = 0.0313980546969172, month_6 = 0.0307021354848187,
barometer = 0.0297905815436382, month_5 = 0.0275607431560466,
text_light_rain = 0.0165770194829191, month_2 = 0.0165630157979537,
text_mostly_cloudy = 0.0121088618908841, text_sunny = 0.00941388986252044,
text_fog = 0.00924611477602324, workday_on_holiday = 0.00284118722006891,
text_passing_clouds = 0.00150433375272096, text_rain = 0.00131183594715628,
weekend = 0, weekend_on_holiday = 0), c(protocol_active = 0.427757390802854,
wind = 0.408503171009464, month_11 = 0.275057127435594, month_8 = 0.142977205336468,
temp = 0.138475854744559, weekday = 0.131070281010648, humidity = 0.0898046759674304,
holiday = 0.086630490993674, month_1 = 0.0596217489313094, month_10 = 0.0551334046364746,
text_scattered_clouds = 0.0490242183124676, month_12 = 0.045106370859385,
month_4 = 0.0419702477855225, month_3 = 0.0404903265753906, month_5 = 0.0359349426154136,
barometer = 0.035618224264753, month_6 = 0.0338249178101483,
month_7 = 0.0327099416366689, month_9 = 0.0293428124958271, text_mostly_cloudy = 0.0270874829871817,
month_2 = 0.0180123197586705, text_passing_clouds = 0.0118664281453393,
text_sunny = 0.0103031663280448, text_light_rain = 0.00942806139275789,
text_fog = 0.00806600748408229, workday_on_holiday = 0.00241487503942681,
text_rain = 0.0000570347965499609, weekend = 0, weekend_on_holiday = 0
), c(wind = 0.336572349791158, holiday = 0.198779253833438, month_1 = 0.192421516318504,
month_10 = 0.144445315616197, temp = 0.143690255193945, month_11 = 0.137325167540274,
text_scattered_clouds = 0.10122916446616, humidity = 0.0828318548018303,
weekday = 0.0823615530607839, month_12 = 0.0737718595642614,
month_5 = 0.0594576071260418, month_8 = 0.0588273438617596, month_4 = 0.0573095170966537,
text_mostly_cloudy = 0.0480329543671073, month_6 = 0.0402532857184651,
barometer = 0.0396320005493679, month_3 = 0.026472471467845,
month_7 = 0.0262888669729505, month_9 = 0.0259344946067317, text_sunny = 0.0131106700559495,
month_2 = 0.012995547924582, workday_on_holiday = 0.00982112260492833,
text_passing_clouds = 0.00683627593864011, protocol_active = 0.00647374322450801,
text_light_rain = 0.0063248456805146, text_fog = 0.00585607353395349,
text_rain = 0.000405401311389258, weekend = 0, weekend_on_holiday = 0
), c(protocol_active = 0.457218040022404, wind = 0.386653192913039,
month_11 = 0.271520132187022, holiday = 0.166075296710207, temp = 0.148792881213105,
weekday = 0.106041161955832, humidity = 0.0929848531838744, month_1 = 0.0928483740915651,
month_8 = 0.0829540333434191, month_10 = 0.0699121444845427,
text_fog = 0.0525342428581534, text_scattered_clouds = 0.0522970455826638,
barometer = 0.0431168167702891, month_7 = 0.0419820798871418,
month_4 = 0.041477494010643, month_9 = 0.0375248375546493, month_5 = 0.0354565058054496,
text_mostly_cloudy = 0.0297605077110945, text_passing_clouds = 0.027437090518306,
month_2 = 0.0271775084449888, month_6 = 0.0217419101984227, text_light_rain = 0.0200993262652359,
workday_on_holiday = 0.019565240559317, month_3 = 0.0187113693519814,
month_12 = 0.018413791610736, text_sunny = 0.0099830383163256,
text_rain = 0.00329234272052351, weekend = 0, weekend_on_holiday = 0
), c(wind = 0.285756555215212, month_1 = 0.179849187294914, month_11 = 0.164289483281711,
holiday = 0.154516151695423, month_10 = 0.150120774452196, temp = 0.134707708686716,
weekday = 0.0989596352406424, month_12 = 0.0891791624140386,
text_scattered_clouds = 0.0775458226511579, humidity = 0.0644600094005282,
month_4 = 0.054180913826995, protocol_active = 0.0535038970887117,
month_5 = 0.0524276994044104, text_mostly_cloudy = 0.0474800352970501,
month_6 = 0.0472995256777581, month_8 = 0.047177053618853, barometer = 0.035944823214537,
month_7 = 0.0337175876492492, month_9 = 0.0313097306311111, workday_on_holiday = 0.0255306703510554,
month_3 = 0.0207022198390048, month_2 = 0.0162812998382264, text_sunny = 0.0105475327224613,
text_passing_clouds = 0.00751715134937259, text_light_rain = 0.00611453089628769,
text_fog = 0.00589259659924484, text_rain = 0.00199902163654753,
weekend = 0, weekend_on_holiday = 0), c(wind = 0.328219459502805,
month_1 = 0.175075058064096, holiday = 0.160793264354813, month_11 = 0.129548105560073,
text_scattered_clouds = 0.123147537680045, temp = 0.121607173813749,
month_10 = 0.113682198084755, month_12 = 0.0997093907485133,
weekday = 0.0832095032532329, month_5 = 0.0608440197523202, humidity = 0.060535465962531,
month_4 = 0.0584286914194283, month_9 = 0.0447241908785585, barometer = 0.0440128902307778,
month_8 = 0.0438292939943096, protocol_active = 0.0419578197714128,
month_3 = 0.0339254215996517, month_6 = 0.0337754882748779, month_7 = 0.031814906735976,
month_2 = 0.0270908407671335, text_mostly_cloudy = 0.0219086588144549,
text_sunny = 0.0136285604898165, workday_on_holiday = 0.00761672222267062,
text_light_rain = 0.00634132165607431, text_fog = 0.00608799696248636,
text_passing_clouds = 0.0040204867146501, text_rain = 0.000376092383049835,
weekend = 0, weekend_on_holiday = 0), c(wind = 0.317822839842299,
month_11 = 0.19192646205017, holiday = 0.185426564412574, temp = 0.13593219239286,
month_10 = 0.13277574966079, text_scattered_clouds = 0.0995925773904748,
month_1 = 0.0979915406435864, weekday = 0.0751849300079218, humidity = 0.0683413140459836,
month_2 = 0.0640093204816251, month_5 = 0.0611092551132147, month_7 = 0.058891413580269,
month_6 = 0.0547705294287946, barometer = 0.0514254934314588,
month_8 = 0.0488036307320211, text_mostly_cloudy = 0.0412003813198763,
month_12 = 0.0411461956492842, month_9 = 0.0286932268469131,
month_4 = 0.0229876443679717, month_3 = 0.0189662051480523, workday_on_holiday = 0.0112685893702674,
text_light_rain = 0.0109155125639584, text_passing_clouds = 0.00886646494182724,
text_fog = 0.00528032941976031, text_rain = 0.00421637095753226,
text_sunny = 0.00182733590607928, weekend = 0, weekend_on_holiday = 0,
protocol_active = 0), c(protocol_active = 0.51500155823688, wind = 0.369391322961783,
month_11 = 0.234622367311558, holiday = 0.184593894040067, temp = 0.149243922588351,
weekday = 0.13568649568242, month_8 = 0.111535093753458, humidity = 0.0831650037468867,
month_4 = 0.06233952671686, month_5 = 0.0582210814027481, month_1 = 0.0524249054181079,
month_10 = 0.0513109900081503, text_scattered_clouds = 0.0449822947458677,
month_6 = 0.0371093226111915, month_7 = 0.0345599941131351, barometer = 0.0306446007250308,
month_9 = 0.0274106106748507, text_fog = 0.0221568992510268,
text_passing_clouds = 0.0211599513636558, text_mostly_cloudy = 0.0148391773192782,
month_3 = 0.0141197551543251, month_2 = 0.0140401629120377, workday_on_holiday = 0.00737117942694796,
text_sunny = 0.00720100269873624, month_12 = 0.00527240881870701,
text_light_rain = 0.00130866158585655, text_rain = 0.000624886909196766,
weekend = 0, weekend_on_holiday = 0), c(protocol_active = 0.5812855848983,
wind = 0.388742283293946, month_11 = 0.244592963846307, holiday = 0.158002529973717,
weekday = 0.122634703648961, temp = 0.119940003635667, month_1 = 0.0838425453701248,
month_8 = 0.0770040860945533, humidity = 0.0738192673487, month_10 = 0.0610040306320975,
text_scattered_clouds = 0.0591100941672092, barometer = 0.056244713686979,
month_5 = 0.0369698544273875, month_9 = 0.036858099182753, month_2 = 0.0310369344611044,
month_6 = 0.0301084762225969, month_4 = 0.0287642538258338, text_mostly_cloudy = 0.0273765916021787,
month_3 = 0.025851829004895, month_7 = 0.0254969442110151, text_light_rain = 0.0250549811478619,
text_fog = 0.0222954459465601, workday_on_holiday = 0.0213043972641468,
text_passing_clouds = 0.0177354853346569, month_12 = 0.00949038839605307,
text_sunny = 0.00446652838284589, weekend = 0, weekend_on_holiday = 0,
text_rain = 0), c(protocol_active = 0.474242671289945, wind = 0.422109119973802,
month_10 = 0.18775162510744, holiday = 0.182591428049759, temp = 0.136095003370541,
month_11 = 0.104629510112073, month_12 = 0.10377588975137, weekday = 0.10162171488075,
month_8 = 0.0872754275444851, month_1 = 0.0742447916325022, humidity = 0.0667930411502195,
month_4 = 0.0641386250875992, text_scattered_clouds = 0.058944967751334,
month_5 = 0.0410161574298865, month_3 = 0.0388656146056763, barometer = 0.0385532707949005,
month_9 = 0.0370659909291367, month_7 = 0.0351931395507779, month_6 = 0.027635447313099,
text_mostly_cloudy = 0.0202467735960961, month_2 = 0.0152577431908634,
text_light_rain = 0.00846413168710652, text_sunny = 0.00513080847316623,
text_fog = 0.00319036182896425, workday_on_holiday = 0.00303045921527343,
text_passing_clouds = 0.00235587942164676, text_rain = 0.000150063164697571,
weekend = 0, weekend_on_holiday = 0)), list(c(wind = 0.3471960493154,
temp = 0.204772614566322, month_8 = 0.119633369487987, humidity = 0.114447660606209,
holiday = 0.112215067123671, month_10 = 0.109680992791846, month_11 = 0.0949710751650855,
month_1 = 0.0678540389508553, month_4 = 0.0676970303790074, barometer = 0.0638877490405209,
weekday = 0.0603264305881994, text_mostly_cloudy = 0.059886928575409,
month_7 = 0.0523244261699112, month_3 = 0.0464621031121763, text_scattered_clouds = 0.0426460498828706,
month_5 = 0.0393232886119189, month_9 = 0.0329339301863209, workday_on_holiday = 0.026400691935472,
month_12 = 0.0239766088909189, month_6 = 0.0209643615779743,
text_rain = 0.00470063751244484, month_2 = 0.00435824692036667,
text_fog = 0.00358736017917106, text_passing_clouds = 0.00254604459529451,
text_light_rain = 0.00246286783930867, text_sunny = 0.000557708446459696,
weekend = 0, weekend_on_holiday = 0, protocol_active = 0), c(protocol_active = 0.546549613644543,
wind = 0.443618430590955, holiday = 0.2057616408105, temp = 0.143528428632999,
month_10 = 0.139108116096353, weekday = 0.119753870444551, month_11 = 0.105665854854535,
month_4 = 0.0847140095491025, humidity = 0.0702211903523539,
month_5 = 0.067856426839823, month_9 = 0.0585853496855593, barometer = 0.0466051602491349,
month_8 = 0.0407423583947575, month_1 = 0.0370854357117149, month_6 = 0.0345889221737587,
month_12 = 0.0331118828706341, text_mostly_cloudy = 0.0265744483947316,
month_3 = 0.0250310123421796, text_light_rain = 0.0236595287710666,
month_7 = 0.0236081493886604, text_scattered_clouds = 0.0229368038071515,
month_2 = 0.0119531214563892, text_fog = 0.00546791553037501,
workday_on_holiday = 0.00441453391159821, text_rain = 0.00314937465607303,
text_sunny = 0.00282535660389051, text_passing_clouds = 0.00253598129527737,
weekend = 0, weekend_on_holiday = 0), c(protocol_active = 0.518170012744594,
wind = 0.468760529065347, temp = 0.198249993483989, month_8 = 0.127854839789779,
holiday = 0.115651709099816, humidity = 0.10895871515734, month_1 = 0.104507054764879,
weekday = 0.0970008689541525, barometer = 0.0558000887901608,
month_12 = 0.0520648544022737, month_11 = 0.0498573669270702,
month_3 = 0.0475327540435148, text_mostly_cloudy = 0.0420257895091999,
month_10 = 0.0392210214613824, month_7 = 0.0346112258522878,
month_4 = 0.030376681720957, month_6 = 0.0274944621384594, month_9 = 0.0250618364774626,
workday_on_holiday = 0.0238621021362317, month_5 = 0.0199367708332576,
text_scattered_clouds = 0.0123115063994457, month_2 = 0.00480323263037882,
text_sunny = 0.00464160762224322, text_fog = 0.00246012251002589,
text_light_rain = 0.00221074363608796, text_rain = 0.00193594425875674,
text_passing_clouds = 0.00193056194592034, weekend = 0, weekend_on_holiday = 0
), c(wind = 0.362992887362438, temp = 0.156517904643566, month_12 = 0.114009635327341,
month_10 = 0.105016643601602, month_7 = 0.101879905068133, barometer = 0.0890323752272844,
weekday = 0.0883166062815719, text_mostly_cloudy = 0.0849764846835166,
humidity = 0.07626973618123, month_3 = 0.0604644771419713, workday_on_holiday = 0.0598483406595745,
month_4 = 0.0540825822794581, month_8 = 0.0479107586305469, month_9 = 0.0455382942339936,
month_1 = 0.036916349709489, holiday = 0.0362250549890437, month_11 = 0.0354289955801871,
text_scattered_clouds = 0.027544355493611, text_fog = 0.018845295941842,
text_light_rain = 0.0174401463508169, month_5 = 0.0135907923844196,
text_rain = 0.0128968099968882, month_6 = 0.012569892360263,
month_2 = 0.00509965945535965, text_passing_clouds = 0.00139377025885244,
text_sunny = 0.000367025698946253, weekend = 0, weekend_on_holiday = 0,
protocol_active = 0), c(protocol_active = 0.619563503393299,
wind = 0.457064448140408, holiday = 0.181107866730898, temp = 0.140728671764677,
month_11 = 0.129063893852067, weekday = 0.11427594683384, month_10 = 0.0885211368669627,
month_9 = 0.0783348566882278, month_4 = 0.075404001857456, month_1 = 0.0732684205679306,
month_3 = 0.0566192154215487, humidity = 0.0469606031303847,
month_12 = 0.0465199248622981, month_5 = 0.0434354892472862,
month_8 = 0.0341517087922657, barometer = 0.0340740037986594,
workday_on_holiday = 0.0271233329090149, text_scattered_clouds = 0.0252819455135321,
text_mostly_cloudy = 0.0209707050348469, month_7 = 0.020118997730825,
text_fog = 0.0177517202234142, text_light_rain = 0.0141883356057609,
month_6 = 0.012501962568832, month_2 = 0.00782442912383458, text_rain = 0.00240311886770778,
text_sunny = 0.00235140240465584, text_passing_clouds = 0.001641017195825,
weekend = 0, weekend_on_holiday = 0), c(protocol_active = 0.609327859788725,
wind = 0.456351663566834, holiday = 0.148564431615616, temp = 0.140337292819591,
month_10 = 0.132416416010628, month_11 = 0.117216315071979, weekday = 0.102646726133412,
month_9 = 0.0818879473805598, month_1 = 0.0711949855201882, month_4 = 0.0700700130827537,
humidity = 0.0678324389551247, month_5 = 0.049777553432098, barometer = 0.0466848493424757,
month_12 = 0.0408083424048677, text_mostly_cloudy = 0.0374117362364004,
month_3 = 0.0289161419390688, month_7 = 0.0254772765149833, text_scattered_clouds = 0.0248008842188115,
month_8 = 0.0228434387129598, text_rain = 0.0152162249995285,
text_light_rain = 0.0144390966240625, workday_on_holiday = 0.0139014270811525,
text_fog = 0.0111675927635563, month_6 = 0.00771660135004278,
text_passing_clouds = 0.00333411018372105, month_2 = 0.00315501674433698,
text_sunny = 0.00271693577132569, weekend = 0, weekend_on_holiday = 0
), c(wind = 0.341318757984593, temp = 0.181543743016176, month_10 = 0.13695143016574,
month_1 = 0.11867567475664, text_mostly_cloudy = 0.100970260189399,
holiday = 0.0980616427161045, barometer = 0.0793575984151815,
month_7 = 0.0790023186407231, month_11 = 0.0703358960510832,
weekday = 0.0660567048872761, month_8 = 0.0646335429141987, humidity = 0.0584869976667937,
month_9 = 0.0550697732815506, month_4 = 0.0549736535127431, text_rain = 0.0324340487643226,
text_scattered_clouds = 0.029467215459551, month_5 = 0.026095418599204,
month_12 = 0.0228145297956929, workday_on_holiday = 0.02231496147956,
month_3 = 0.0172067242969555, month_6 = 0.0151089321051142, text_fog = 0.0119331553129859,
month_2 = 0.004686956213666, text_light_rain = 0.00222796628025926,
text_passing_clouds = 0.00213700559004825, text_sunny = 0.00117576091734465,
weekend = 0, weekend_on_holiday = 0, protocol_active = 0), c(wind = 0.317176884816342,
temp = 0.186585429980718, month_10 = 0.114666912663031, month_11 = 0.104605599640779,
barometer = 0.09860398214251, text_mostly_cloudy = 0.0981445614080669,
month_7 = 0.086645777661902, weekday = 0.0827571745079603, month_3 = 0.0822469143395219,
holiday = 0.0741225284600942, humidity = 0.0680909881825519,
month_8 = 0.0676141235433077, month_1 = 0.0666523905343389, month_4 = 0.057138819125979,
month_9 = 0.0566241708282194, workday_on_holiday = 0.0514050400134423,
text_scattered_clouds = 0.0386366823825728, month_2 = 0.0275814191334069,
month_6 = 0.0180563169006692, month_5 = 0.0171425190230017, text_fog = 0.0147302871581154,
text_rain = 0.0113228506870373, month_12 = 0.00608702311249765,
text_light_rain = 0.00384076425344412, text_passing_clouds = 0.00162419812395092,
text_sunny = 0.00161398823166901, weekend = 0, weekend_on_holiday = 0,
protocol_active = 0), c(wind = 0.375885075304381, temp = 0.196911627075252,
month_1 = 0.138145776167852, month_10 = 0.1084922540901, month_7 = 0.102679471840915,
text_mostly_cloudy = 0.101000594539934, humidity = 0.0873952553634127,
holiday = 0.0831717698088636, weekday = 0.0709255464503129, month_11 = 0.0684159875069171,
month_4 = 0.0625302634603284, month_8 = 0.0597528607537757, month_9 = 0.0577152460643418,
barometer = 0.0573343434453839, workday_on_holiday = 0.0532975932012499,
month_3 = 0.0431124968933724, month_12 = 0.0300806329768474,
text_scattered_clouds = 0.0287391537020907, month_2 = 0.0263872490630998,
text_rain = 0.023765753120286, month_5 = 0.0137840943180421,
text_fog = 0.00944782494843987, month_6 = 0.00926343392612626,
text_light_rain = 0.00513122997652807, text_passing_clouds = 0.00192773997607476,
text_sunny = 0.000749526165263181, weekend = 0, weekend_on_holiday = 0,
protocol_active = 0), c(wind = 0.380077804633114, temp = 0.193910785717298,
month_8 = 0.134010390554593, month_11 = 0.13263544712777, month_1 = 0.108483703190367,
humidity = 0.0857712876190871, holiday = 0.0789236757853526,
barometer = 0.0758084804113203, month_10 = 0.0755415201722963,
text_mostly_cloudy = 0.0680279704685786, workday_on_holiday = 0.0658503648376073,
weekday = 0.0563462752284063, month_4 = 0.054099467118469, month_7 = 0.0467023095318018,
month_3 = 0.0433152559594331, month_6 = 0.0356285987785469, text_scattered_clouds = 0.0320350306800973,
month_9 = 0.0316930312848571, protocol_active = 0.0258647354336702,
month_12 = 0.0173648500177142, month_5 = 0.013542126122798, text_fog = 0.0127799333001967,
month_2 = 0.0054027507247214, text_light_rain = 0.00488149158866038,
text_passing_clouds = 0.00411573011748326, text_rain = 0.0039578812850956,
text_sunny = 0.00152551980949809, weekend = 0, weekend_on_holiday = 0
)))
最佳答案
在这里,我们可以做一个双map
,避免加载多个包
library(purrr)
map_dfr(myList, ~ map_dfr(.x, as.list) )
# A tibble: 20 x 29
# protocol_active wind holiday month_10 month_8 temp month_11 humidity weekday month_1 text_scattered_… month_4 month_3 month_12 month_7
# <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
# 1 0.477 0.422 0.238 0.174 0.146 0.136 0.117 0.0981 0.0936 0.0758 0.0714 0.0459 0.0446 0.0401 0.0397
# 2 0.428 0.409 0.0866 0.0551 0.143 0.138 0.275 0.0898 0.131 0.0596 0.0490 0.0420 0.0405 0.0451 0.0327
# 3 0.00647 0.337 0.199 0.144 0.0588 0.144 0.137 0.0828 0.0824 0.192 0.101 0.0573 0.0265 0.0738 0.0263
# 4 0.457 0.387 0.166 0.0699 0.0830 0.149 0.272 0.0930 0.106 0.0928 0.0523 0.0415 0.0187 0.0184 0.0420
# 5 0.0535 0.286 0.155 0.150 0.0472 0.135 0.164 0.0645 0.0990 0.180 0.0775 0.0542 0.0207 0.0892 0.0337
# 6 0.0420 0.328 0.161 0.114 0.0438 0.122 0.130 0.0605 0.0832 0.175 0.123 0.0584 0.0339 0.0997 0.0318
# 7 0 0.318 0.185 0.133 0.0488 0.136 0.192 0.0683 0.0752 0.0980 0.0996 0.0230 0.0190 0.0411 0.0589
# 8 0.515 0.369 0.185 0.0513 0.112 0.149 0.235 0.0832 0.136 0.0524 0.0450 0.0623 0.0141 0.00527 0.0346
# 9 0.581 0.389 0.158 0.0610 0.0770 0.120 0.245 0.0738 0.123 0.0838 0.0591 0.0288 0.0259 0.00949 0.0255
#10 0.474 0.422 0.183 0.188 0.0873 0.136 0.105 0.0668 0.102 0.0742 0.0589 0.0641 0.0389 0.104 0.0352
#11 0 0.347 0.112 0.110 0.120 0.205 0.0950 0.114 0.0603 0.0679 0.0426 0.0677 0.0465 0.0240 0.0523
#12 0.547 0.444 0.206 0.139 0.0407 0.144 0.106 0.0702 0.120 0.0371 0.0229 0.0847 0.0250 0.0331 0.0236
#13 0.518 0.469 0.116 0.0392 0.128 0.198 0.0499 0.109 0.0970 0.105 0.0123 0.0304 0.0475 0.0521 0.0346
#14 0 0.363 0.0362 0.105 0.0479 0.157 0.0354 0.0763 0.0883 0.0369 0.0275 0.0541 0.0605 0.114 0.102
#15 0.620 0.457 0.181 0.0885 0.0342 0.141 0.129 0.0470 0.114 0.0733 0.0253 0.0754 0.0566 0.0465 0.0201
#16 0.609 0.456 0.149 0.132 0.0228 0.140 0.117 0.0678 0.103 0.0712 0.0248 0.0701 0.0289 0.0408 0.0255
#17 0 0.341 0.0981 0.137 0.0646 0.182 0.0703 0.0585 0.0661 0.119 0.0295 0.0550 0.0172 0.0228 0.0790
#18 0 0.317 0.0741 0.115 0.0676 0.187 0.105 0.0681 0.0828 0.0667 0.0386 0.0571 0.0822 0.00609 0.0866
#19 0 0.376 0.0832 0.108 0.0598 0.197 0.0684 0.0874 0.0709 0.138 0.0287 0.0625 0.0431 0.0301 0.103
#20 0.0259 0.380 0.0789 0.0755 0.134 0.194 0.133 0.0858 0.0563 0.108 0.0320 0.0541 0.0433 0.0174 0.0467
# … with 14 more variables: month_9 <dbl>, month_6 <dbl>, barometer <dbl>, month_5 <dbl>, text_light_rain <dbl>, month_2 <dbl>,
# text_mostly_cloudy <dbl>, text_sunny <dbl>, text_fog <dbl>, workday_on_holiday <dbl>, text_passing_clouds <dbl>, text_rain <dbl>,
# weekend <dbl>, weekend_on_holiday <dbl>
或者另一种选择是 unnest_wider
library(tidyr)
map_dfr(myList, ~ tibble(col = .x) %>%
unnest_wider(col))
# A tibble: 20 x 29
# protocol_active wind holiday month_10 month_8 temp month_11 humidity weekday month_1 text_scattered_… month_4 month_3 month_12 month_7
# <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
# 1 0.477 0.422 0.238 0.174 0.146 0.136 0.117 0.0981 0.0936 0.0758 0.0714 0.0459 0.0446 0.0401 0.0397
# 2 0.428 0.409 0.0866 0.0551 0.143 0.138 0.275 0.0898 0.131 0.0596 0.0490 0.0420 0.0405 0.0451 0.0327
# 3 0.00647 0.337 0.199 0.144 0.0588 0.144 0.137 0.0828 0.0824 0.192 0.101 0.0573 0.0265 0.0738 0.0263
# 4 0.457 0.387 0.166 0.0699 0.0830 0.149 0.272 0.0930 0.106 0.0928 0.0523 0.0415 0.0187 0.0184 0.0420
# 5 0.0535 0.286 0.155 0.150 0.0472 0.135 0.164 0.0645 0.0990 0.180 0.0775 0.0542 0.0207 0.0892 0.0337
# 6 0.0420 0.328 0.161 0.114 0.0438 0.122 0.130 0.0605 0.0832 0.175 0.123 0.0584 0.0339 0.0997 0.0318
# 7 0 0.318 0.185 0.133 0.0488 0.136 0.192 0.0683 0.0752 0.0980 0.0996 0.0230 0.0190 0.0411 0.0589
# 8 0.515 0.369 0.185 0.0513 0.112 0.149 0.235 0.0832 0.136 0.0524 0.0450 0.0623 0.0141 0.00527 0.0346
# 9 0.581 0.389 0.158 0.0610 0.0770 0.120 0.245 0.0738 0.123 0.0838 0.0591 0.0288 0.0259 0.00949 0.0255
#10 0.474 0.422 0.183 0.188 0.0873 0.136 0.105 0.0668 0.102 0.0742 0.0589 0.0641 0.0389 0.104 0.0352
#11 0 0.347 0.112 0.110 0.120 0.205 0.0950 0.114 0.0603 0.0679 0.0426 0.0677 0.0465 0.0240 0.0523
#12 0.547 0.444 0.206 0.139 0.0407 0.144 0.106 0.0702 0.120 0.0371 0.0229 0.0847 0.0250 0.0331 0.0236
#13 0.518 0.469 0.116 0.0392 0.128 0.198 0.0499 0.109 0.0970 0.105 0.0123 0.0304 0.0475 0.0521 0.0346
#14 0 0.363 0.0362 0.105 0.0479 0.157 0.0354 0.0763 0.0883 0.0369 0.0275 0.0541 0.0605 0.114 0.102
#15 0.620 0.457 0.181 0.0885 0.0342 0.141 0.129 0.0470 0.114 0.0733 0.0253 0.0754 0.0566 0.0465 0.0201
#16 0.609 0.456 0.149 0.132 0.0228 0.140 0.117 0.0678 0.103 0.0712 0.0248 0.0701 0.0289 0.0408 0.0255
#17 0 0.341 0.0981 0.137 0.0646 0.182 0.0703 0.0585 0.0661 0.119 0.0295 0.0550 0.0172 0.0228 0.0790
#18 0 0.317 0.0741 0.115 0.0676 0.187 0.105 0.0681 0.0828 0.0667 0.0386 0.0571 0.0822 0.00609 0.0866
#19 0 0.376 0.0832 0.108 0.0598 0.197 0.0684 0.0874 0.0709 0.138 0.0287 0.0625 0.0431 0.0301 0.103
#20 0.0259 0.380 0.0789 0.0755 0.134 0.194 0.133 0.0858 0.0563 0.108 0.0320 0.0541 0.0433 0.0174 0.0467
# … with 14 more variables: month_9 <dbl>, month_6 <dbl>, barometer <dbl>, month_5 <dbl>, text_light_rain <dbl>, month_2 <dbl>,
# text_mostly_cloudy <dbl>, text_sunny <dbl>, text_fog <dbl>, workday_on_holiday <dbl>, text_passing_clouds <dbl>, text_rain <dbl>,
# weekend <dbl>, weekend_on_holiday <dbl>
或者另一种选择是reduce/bind_rows
library(dplyr)
map_dfr(myList, reduce, bind_rows)
# A tibble: 20 x 29
# protocol_active wind holiday month_10 month_8 temp month_11 humidity weekday month_1 text_scattered_… month_4 month_3 month_12 month_7
# <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
# 1 0.477 0.422 0.238 0.174 0.146 0.136 0.117 0.0981 0.0936 0.0758 0.0714 0.0459 0.0446 0.0401 0.0397
# 2 0.428 0.409 0.0866 0.0551 0.143 0.138 0.275 0.0898 0.131 0.0596 0.0490 0.0420 0.0405 0.0451 0.0327
# 3 0.00647 0.337 0.199 0.144 0.0588 0.144 0.137 0.0828 0.0824 0.192 0.101 0.0573 0.0265 0.0738 0.0263
# 4 0.457 0.387 0.166 0.0699 0.0830 0.149 0.272 0.0930 0.106 0.0928 0.0523 0.0415 0.0187 0.0184 0.0420
# 5 0.0535 0.286 0.155 0.150 0.0472 0.135 0.164 0.0645 0.0990 0.180 0.0775 0.0542 0.0207 0.0892 0.0337
# 6 0.0420 0.328 0.161 0.114 0.0438 0.122 0.130 0.0605 0.0832 0.175 0.123 0.0584 0.0339 0.0997 0.0318
# 7 0 0.318 0.185 0.133 0.0488 0.136 0.192 0.0683 0.0752 0.0980 0.0996 0.0230 0.0190 0.0411 0.0589
# 8 0.515 0.369 0.185 0.0513 0.112 0.149 0.235 0.0832 0.136 0.0524 0.0450 0.0623 0.0141 0.00527 0.0346
# 9 0.581 0.389 0.158 0.0610 0.0770 0.120 0.245 0.0738 0.123 0.0838 0.0591 0.0288 0.0259 0.00949 0.0255
#10 0.474 0.422 0.183 0.188 0.0873 0.136 0.105 0.0668 0.102 0.0742 0.0589 0.0641 0.0389 0.104 0.0352
#11 0 0.347 0.112 0.110 0.120 0.205 0.0950 0.114 0.0603 0.0679 0.0426 0.0677 0.0465 0.0240 0.0523
#12 0.547 0.444 0.206 0.139 0.0407 0.144 0.106 0.0702 0.120 0.0371 0.0229 0.0847 0.0250 0.0331 0.0236
#13 0.518 0.469 0.116 0.0392 0.128 0.198 0.0499 0.109 0.0970 0.105 0.0123 0.0304 0.0475 0.0521 0.0346
#14 0 0.363 0.0362 0.105 0.0479 0.157 0.0354 0.0763 0.0883 0.0369 0.0275 0.0541 0.0605 0.114 0.102
#15 0.620 0.457 0.181 0.0885 0.0342 0.141 0.129 0.0470 0.114 0.0733 0.0253 0.0754 0.0566 0.0465 0.0201
#16 0.609 0.456 0.149 0.132 0.0228 0.140 0.117 0.0678 0.103 0.0712 0.0248 0.0701 0.0289 0.0408 0.0255
#17 0 0.341 0.0981 0.137 0.0646 0.182 0.0703 0.0585 0.0661 0.119 0.0295 0.0550 0.0172 0.0228 0.0790
#18 0 0.317 0.0741 0.115 0.0676 0.187 0.105 0.0681 0.0828 0.0667 0.0386 0.0571 0.0822 0.00609 0.0866
#19 0 0.376 0.0832 0.108 0.0598 0.197 0.0684 0.0874 0.0709 0.138 0.0287 0.0625 0.0431 0.0301 0.103
#20 0.0259 0.380 0.0789 0.0755 0.134 0.194 0.133 0.0858 0.0563 0.108 0.0320 0.0541 0.0433 0.0174 0.0467
# … with 14 more variables: month_9 <dbl>, month_6 <dbl>, barometer <dbl>, month_5 <dbl>, text_light_rain <dbl>, month_2 <dbl>,
# text_mostly_cloudy <dbl>, text_sunny <dbl>, text_fog <dbl>, workday_on_holiday <dbl>, text_passing_clouds <dbl>, text_rain <dbl>,
# weekend <dbl>, weekend_on_holiday <dbl>
>
关于r - 使用 bind_rows、do.call(rbind,.) 和 plyr::ldply 时,将列表绑定(bind)在一起给我不正确的结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59400681/
我有一个 foo 类,它有一个 bar 方法,它接受可调用的东西(函数指针/仿函数)。这个可调用的东西应该作为绑定(bind)元素传递给另一个方法 doit 和第三个方法 bar_cb 方法。 #in
我正在尝试在我的 WPF 4.0 应用程序(使用 VS 2010 Pro RTM)中创建自定义 TabItem 模板/样式,但尽管一切似乎都正常工作,但我注意到跟踪窗口中存在绑定(bind)错误。 我
作为一名刚接触 Android 的开发人员,我想我可能误解了绑定(bind)服务。 我创建了一项服务来结束对服务器的访问。作为此服务的一部分,该服务正在监听多播地址,以识别本地网络上的设备何时出现和消
这个问题在这里已经有了答案: What is the use of the JavaScript 'bind' method? (23 个回答) 关闭 7 年前。 所以我一直在尝试了解一些 JS 上
我不明白这三种语法之间的区别: where a = f (b) do a <- f (b) do let a = f (b) 我确实明白了a <- f(b)与其他两个不同,在大多数情况下,我尝试了所有
我在将 Cocoa 项目从手动同步接口(interface)模型转换为绑定(bind)模型时遇到问题,这样我就不必担心接口(interface)粘合代码。 我关注了 CocoaDevCentral C
我正在尝试找出一种好的方法来对处理大数据集的代码进行并行化,然后将结果数据导入 RavenDb。 数据处理受 CPU 限制和数据库导入 IO 限制。 我正在寻找一种解决方案,以对 Environmen
我正在 foreach 循环中生成单选按钮。我试图将选中的属性绑定(bind)到父级中的基本可观察值。不幸的是,当单击单选按钮时,父级的属性似乎没有在单击处理程序中更新。 基于一些previous w
在我的 Windows Phone 应用程序中,我有两个 LongListSelectors并排在页面上。我想做到这一点,以便当用户滚动其中一个时,另一个滚动相同的量。 两个 LongListSele
我在网上看到这个问题准备面试: Given a non-preemptive kernel which type of process will get affected morein terms o
我有一个 foreach 绑定(bind),如下所示: Summary Permitting 原因是有两个选项卡始终存在,并且我根据是否添加了其他选项卡来添加其他选项
任何人都有绑定(bind)相同的情况DataContext到 TextBlock 中的 Text 属性(例如)。 我必须分配 DataContext以我的风格反射(reflect)基于 Datacon
给定以下代码: Login 和下面的javascript $(function () { $('#btnLogin').click(function () { co
我使用 boost::asio 创建了一个服务器。我在绑定(bind)到端点时遇到问题。所以,如果我在构造函数中初始化一个接受器: Server::Server(QWidget *parent) :
我正在将现有项目从 MySQL 转换为 Postgres。代码中有相当多的原始 SQL 文字使用 ? 作为占位符,例如 SELECT id FROM users WHERE
似乎在绑定(bind)某些数据时出错了,有人可以帮我解决我哪里出错了,尽管我无法弄清楚。 真的不需要在这里显示太多,这是 Binding,我已经通过移除背景并在其中放置颜色来测试背景,效果很好。 编辑
我正在尝试使用 wcf 构建一个 http 监听器(web 服务)。这个监听器是一个更大的桌面应用程序的一部分。此桌面应用程序还会调用 http 监听器。 当监听器接收到数据时,它应该被传递到桌面应用
嘿嘿。 我正在使用 Node.JS 和 child_process 来生成 bash 进程。我试图了解我是否正在执行 I/O 绑定(bind)、CPU 绑定(bind)或两者兼而有之。 我正在使用 p
尝试执行以下操作并出现“Got interpolation ({{}}) where expression was expected”错误。 {{item.name}} 谢谢!
我有一个导入的 Java 库,它是我解决方案中的“绑定(bind)库”项目。 我正在尝试从解决方案中的另一个项目绑定(bind)到第 3 方库中的服务。 第 3 方库文档 [在 java 中] 非常简
我是一名优秀的程序员,十分优秀!