convert a data frame into tensor in R -


i have data frame, contain thousands of firms year 1998 2007(each firm not have equal length of time duration). , want convert tensor index: firm, year, variables.

how achieve ?

i don't know how extract small part of data set put here discuss problem, 1 know how it?

structure(list(year = c(1998, 1998, 1998, 1998, 1998, 1998, 1998,  1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998,  1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998,  1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998,  1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998,  1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998,  1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998), firmid = c("qb3732337",  "113810712", "618851819", "619457768", "hu5176905", "618024813",  "617883552", "105679742", "230141773", "609442909", "hu6355534",  "617882832", "60088847x", "617881725", "618403506", "145665417",  "216582994", "14405557x", "103400293", "607369138", "617737408",  "177160683", "142418787", "245560903", "15112238x", "617880650",  "618354214", "226040099", "128955068", "61156047x", "617481385",  "226091312", "190380322", "617880255", "611567073", "gd6120293",  "617876061", "617875739", "126925703", "221461337", "614801582",  "617883931", "618129447", "101713181", "611209524", "617883974",  "706747835", "242727819", "608934944", "619723894", "139432377",  "152102399", "617866832", "614407067", "607282008", "117944574",  "617865629", "618354185", "228791275", "134789270", "113810632",  "ej2468142", "169832427", "115319804", "602003890", "211551128",  "193929448", "105044755", "704448663", "21960081x"), provinceid = c(420000,  140000, 440000, 450000, 420000, 440000, 440000, 130000, 650000,  330000, 420000, 440000, 120000, 440000, 440000, 330000, 530000,  330000, 120000, 310000, 440000, 410000, 320000, 230000, 340000,  440000, 440000, 620000, 230000, 350000, 440000, 620000, 440000,  440000, 350000, 440000, 440000, 440000, 220000, 610000, 410000,  440000, 440000, 110000, 350000, 440000, 410000, 210000, 320000,  450000, 320000, 340000, 440000, 410000, 310000, 210000, 440000,  440000, 650000, 320000, 140000, 330000, 370000, 150000, 140000,  510000, 440000, 130000, 330000, 530000), industrycode2 = c(3400,  3500, 2900, 1900, 1500, 2200, 1400, 3600, 1500, 4000, 1500, 3000,  2400, 2100, 1800, 1300, 2900, 4000, 3600, 2300, 1900, 3700, 2200,  3400, 2600, 1800, 2400, 1300, 1800, 2400, 1900, 3100, 1400, 1700,  2400, 3400, 2600, 2600, 1400, 2600, 3100, 1800, 3100, 1400, 2600,  3300, 1300, 2200, 3000, 3100, 4100, 3000, 1500, 1400, 3500, 3500,  3700, 2600, 2300, 3200, 1700, 4000, 4200, 3600, 2500, 1300, 3500,  3600, 1700, 2600), sales = c(45860, 4050, 17034, 154721, 267,  7703, 47572, 846, 267, 5132, 1767, 8354, 5668, 75330, 8935, 1958,  154721, 13072, 10654, 40505, 20637, 1510, 12884, 10753, 45542,  5286, 27492, 267, 1557, 872, 10892, 1386, 32054, 7290, 6903,  8263, 6996, 12848, 460, 44823, 52000, 16353, 6225, 750, 10863,  35110, 10638, 154721, 18100, 16773, 2415, 8686, 14362, 19831,  46958, 1340, 79855, 61817, 1114, 154721, 7030, 9923, 599, 4060,  154721, 361, 72986, 445, 18080, 3682), cogs = c(44780, 2430,  13839, 144088, 246, 9310, 37863, 495, 52, 4170, 1582, 7416, 3964,  58090, 8639, 1667, 211569, 8066, 4960, 28399, 19831, 1280, 12564,  7540, 37058, 1855, 25519, 70, 1539, 700, 10398, 1190, 25048,  6779, 5500, 7656, 6078, 12519, 370, 39479, 26816, 16586, 6061,  534, 10064, 32783, 8519, 308403, 16000, 23833, 1282, 6918, 12097,  15663, 35182, 768, 76005, 58528, 775, 4362410, 5770, 9040, 417,  2630, 167668, 290, 64038, 306, 15898, 2511), inventory = c(2740,  280, 1950, 46914, 711, 9552, 3984, 4989, 497, 1249, 0, 4336,  1450, 3000, 284, 0, 134404, 5881, 9347, 4818, 1744, 377, 376,  12238, 11669, 835, 17355, 226, 1370, 360, 434, 1089, 12154, 4000,  2388, 7257, 1547, 808, 137, 5920, 8750, 5600, 179, 151, 1321,  3454, 5479, 135303, 7480, 5943, 565, 850, 3032, 1207, 11307,  474, 2574, 26104, 519, 604670, 400, 501, 106, 7040, 43568, 711,  6763, 558, 444, 564), fixedasset = c(8580, 460, 6750, 28874,  2878, 25901, 43081, 3065, 198, 1163, 2140, 8484, 1688, 6900,  631, 1290, 849666, 6545, 10075, 6658, 3089, 581, 114, 22299,  22499, 3967, 54033, 1106, 883, 435, 404, 1712, 29329, 7952, 3176,  10272, 533, 138, 854, 14151, 64252, 10672, 5023, 62, 213, 1068,  572, 1115119, 14090, 71451, 13017, 5390, 6657, 5840, 31943, 80,  26145, 41905, 517, 3801800, 1164, 1725, 220, 15550, 72000, 825,  4697, 1913, 735, 3415), totalasset = c(13610, 3220, 16090, 166501,  14319, 44739, 78920, 10394, 823, 4698, 3101, 25325, 4221, 14900,  3118, 1724, 1091978, 28912, 28272, 27222, 10000, 1178, 1413,  42394, 52156, 11284, 89191, 1582, 6514, 3531, 1495, 3978, 54618,  22352, 13733, 27088, 3247, 1450, 1164, 33419, 129957, 18000,  20163, 266, 3728, 15286, 17337, 1718823, 25650, 94590, 15418,  8430, 12425, 10060, 75576, 991, 46436, 75405, 1973, 5976610,  4604, 5720, 1327, 43440, 248715, 1710, 31723, 2799, 4616, 5417 ), stateshare = c(0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0,  1, 0.518154501914978, 1, 1, 0, 0, 1, 1, 0.699999988079071, 0.831946730613708,  0, 0, 1, 1, 0, 0, 1, 0.200000002980232, 0, 0, 0, 0, 0, 1, 1,  0.400013834238052, 0, 0, 0.25, 0, 0.400000005960464, 0, 1, 0,  0, 1, 1, 0.823567152023315, 0, 0, 1, 0.742925107479095, 0, 1,  0.661562383174896, 1, 0, 1, 1, 0, 1, 0, 1, 0.749309420585632,  1), foreignshare = c(0.571428596973419, 0, 1, 0.385093629360199,  0, 0.5, 1, 0, 0, 0.30011722445488, 0, 0.699992954730988, 1, 1,  0.5, 0, 0, 0, 0, 1, 0.300029307603836, 0, 0, 0, 0, 0.782930612564087,  1, 0, 0, 1, 1, 0, 0.416000008583069, 1, 0.899999976158142, 1,  1, 1, 0, 0, 0.59998619556427, 0.700012564659119, 0.233907759189606,  0, 1, 0.600000023841858, 1, 0, 0.509767174720764, 0.299807518720627,  0, 0, 0, 1, 0.531239151954651, 0, 0.257074922323227, 1, 0, 0.245536029338837,  0, 0.285785287618637, 0, 0, 0.245354115962982, 0, 0.219982624053955,  0, 0.25069060921669, 0), privateshare = c(0.428571432828903,  0, 0, 0.614906370639801, 0, 0.5, 0, 0, 0, 0.699882745742798,  0, 0.300007075071335, 0, 0, 0.5, 0, 0.481845527887344, 0, 0,  0, 0.699970722198486, 0, 0, 0.300000011920929, 0.168053239583969,  0.217069372534752, 0, 0, 0, 0, 0, 0, 0.38400000333786, 0, 0.100000001490116,  0, 0, 0, 0, 0, 0, 0.299987435340881, 0.766092240810394, 0.75,  0, 0, 0, 0, 0.490232825279236, 0.700192511081696, 0, 0, 0.176432847976685,  0, 0.468760877847672, 0, 0, 0, 0, 0.0929015725851059, 0, 0.714214682579041,  0, 0, 0.754645884037018, 0, 0.780017375946045, 0, 0, 0), stateown = c(0,  1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1,  1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0,  0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1,  0, 1, 0, 1, 0, 1), foreignown = c(0, 0, 1, 0, 0, 0, 1, 0, 0,  0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,  1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,  0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0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 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), ir = c(0.061188030987978,  0.115226335823536, 0.140906140208244, 0.325592696666718, 2.8902440071106,  1.02599358558655, 0.105221457779408, 3.07859539985657, 3.07859539985657,  0.299520373344421, 0.0191550496965647, 0.584681749343872, 0.365792125463486,  0.0516440011560917, 0.0328741744160652, 0.0191550496965647, 0.635272681713104,  0.729109823703766, 1.8844758272171, 0.169653862714767, 0.0879431217908859,  0.294531255960464, 0.0299267750233412, 1.62307691574097, 0.314884781837463,  0.450134783983231, 0.680081486701965, 3.07859539985657, 0.890188455581665,  0.514285743236542, 0.0417387969791889, 0.915126025676727, 0.485228359699249,  0.590057551860809, 0.434181809425354, 0.947884023189545, 0.254524528980255,  0.0645418986678123, 0.370270282030106, 0.14995314180851, 0.326297730207443,  0.337634146213531, 0.0295330807566643, 0.282771527767181, 0.131259933114052,  0.105359487235546, 0.643150627613068, 0.438721418380737, 0.467500001192093,  0.249360129237175, 0.44071763753891, 0.12286788225174, 0.250640660524368,  0.0770605877041817, 0.321385949850082, 0.6171875, 0.0338661931455135,  0.446008741855621, 0.669677436351776, 0.138609156012535, 0.0693240910768509,  0.0554203540086746, 0.254196643829346, 2.67680597305298, 0.259846836328506,  2.4517240524292, 0.10560917109251, 1.82352936267853, 0.0279280412942171,  0.224611714482307), gm = c(0.0241179093718529, 0.666666686534882,  0.230869278311729, 0.25, 0, -0.0678684562444687, 0.256424486637115,  0.709090888500214, 0.0769230797886848, 0.230695441365242, 0.116940580308437,  0.126483276486397, 0.429868817329407, 0.296780854463577, 0.0342632234096527,  0.174565091729164, 0.25985848903656, 0.620629787445068, 0.807692289352417,  0.426282614469528, 0.0406434386968613, 0.1796875, 0.0254695955663919,  0.426127314567566, 0.228938415646553, 0.807692289352417, 0.0773149430751801,  -0.0678684562444687, 0.0116959065198898, 0.245714291930199, 0.0475091375410557,  0.164705887436867, 0.279702961444855, 0.0753798484802246, 0.255090922117233,  0.0792842209339142, 0.151036530733109, 0.0262800548225641, 0.243243247270584,  0.135363101959229, 0.807692289352417, -0.0140479924157262, 0.0270582418888807,  0.404494374990463, 0.0793918892741203, 0.0709819123148918, 0.24873811006546,  0.0649604573845863, 0.131249994039536, -0.0678684562444687, 0.807692289352417,  0.255565196275711, 0.187236502766609, 0.266104847192764, 0.334716618061066,  0.744791686534882, 0.0506545640528202, 0.0561953261494637, 0.437419354915619,  0.0327548310160637, 0.218370884656906, 0.0976769924163818, 0.436450839042664,  0.54372626543045, 0.595140397548676, 0.244827583432198, 0.139729529619217,  0.454248368740082, 0.137249961495399, 0.466348081827164), ci = c(0.630418837070465,  0.142857149243355, 0.41951522231102, 0.173416376113892, 0.200991690158844,  0.578935623168945, 0.545881927013397, 0.294881671667099, 0.240583226084709,  0.247552156448364, 0.690099954605103, 0.335004925727844, 0.399905234575272,  0.463087260723114, 0.202373310923576, 0.748259842395782, 0.778098106384277,  0.226376593112946, 0.356359660625458, 0.24458159506321, 0.308899998664856,  0.493208825588226, 0.0846758112311363, 0.52599424123764, 0.431378930807114,  0.351559728384018, 0.605812251567841, 0.699115037918091, 0.135554194450378,  0.123194560408592, 0.270234107971191, 0.430367022752762, 0.536984145641327,  0.355762362480164, 0.231267750263214, 0.379208505153656, 0.164151519536972,  0.0951724126935005, 0.733676970005035, 0.423441767692566, 0.494409680366516,  0.59288889169693, 0.24911966919899, 0.233082711696625, 0.0846758112311363,  0.0846758112311363, 0.0846758112311363, 0.648768961429596, 0.549317717552185,  0.755375862121582, 0.780426323413849, 0.639383137226105, 0.535774648189545,  0.580516874790192, 0.422660619020462, 0.0846758112311363, 0.563032984733582,  0.555732369422913, 0.262037515640259, 0.636113107204437, 0.252823621034622,  0.301573425531387, 0.165787488222122, 0.357965022325516, 0.289487957954407,  0.482456147670746, 0.148062914609909, 0.683458387851715, 0.159228771924973,  0.63042277097702), wacc = c(0.0587803088128567, 0.114285714924335,  0.0474829077720642, 0.089603066444397, 0, -0.0595453642308712,  -0.0409021787345409, 0.00990956369787455, -0.0255164038389921,  0.0834397599101067, 0.00515962578356266, -0.00363277364522219,  0.0127931768074632, 0.175039649009705, 0.0102629894390702, -0.00986078940331936,  -0.00165113247931004, 0.0121057005599141, 0.0084889642894268,  0.175039649009705, -0.0706999972462654, 0.000848896452225745,  0.0481245554983616, 0.0177619475871325, -0.00661477027460933,  -0.0334987565875053, -0.0147324288263917, -0.095448799431324,  0.00445194961503148, 0.0218068547546864, 0.0675585269927979,  0.0175967831164598, 0.0445274449884892, -0.00881352834403515,  0.0546129755675793, -0.0589929111301899, 0.0344933792948723,  0.0675862058997154, 0.0180412363260984, 0.028426943346858, 0.0992020443081856,  -0.016499999910593, -0.0906611084938049, 0.0338345877826214,  -0.103832200169563, 0.0640455335378647, 0.0919997692108154, -0.002492984989658,  0.0179337225854397, -0.103832200169563, -0.035867165774107, 0.0543297752737999,  0.0449094548821449, 0.120576545596123, 0.0157457403838634, -0.0847628638148308,  0.0742096677422523, -0.00257277372293174, 0.0309173855930567,  0.0231686513870955, 0.116203308105469, 0.0748251751065254, 0.11379050463438,  -0.024171270430088, 0.00290694180876017, -0.0760233923792839,  0.166220098733902, 0.0178635232150555, 0.175039649009705, 0.0304596647620201 ), salesgrowth = c(na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_, na_real_, na_real_, na_real_, na_real_, na_real_,  na_real_, na_real_), export = c(0, 0, 0.998237371444702, 0.726109445095062,  0, 0.00252844509668648, 0.895112693309784, 0, 0, 0.0362807661294937,  0, 0.348896056413651, 1, 0.88113659620285, 0.868606626987457,  0, 0, 0, 0.0201816353946924, 0, 1, 0, 0, 0, 0.195195838809013,  1, 0.926722705364227, 0, 0, 0.743137240409851, 1, 0, 0.0486678741872311,  0.944032907485962, 0.501250028610229, 0, 0.999022483825684, 0.996436417102814,  0, 0, 0, 0.988813638687134, 0, 0, 1, 0.967754900455475, 0, 0,  0, 0.00271074729971588, 0, 0, 0.0384709499776363, 0, 0.0599414147436619,  0, 0, 1, 0, 0.000741015828680247, 0, 0.870000004768372, 0, 0,  0.905181586742401, 0, 0.599265575408936, 0, 0.931351482868195,  0), leverage = c(14.4659090042114, 0.483870953321457, 0.5306316614151,  5.99260854721069, 21.3162212371826, 0.802828848361969, 1.31172561645508,  2.2685534954071, 0.796943247318268, 1.39327561855316, 2.87625002861023,  1.1588100194931, 0.973352015018463, 0.183956876397133, 0.769580006599426,  0.289454013109207, 5.48250532150269, 0.52344822883606, 0.197103783488274,  0.183956876397133, 0.570105195045471, 3.6015625, 3.71000003814697,  4.99886798858643, 5.34887409210205, 1.4610687494278, 0.733816742897034,  1.18206894397736, 21.3162212371826, 1.80238091945648, 1.5820380449295,  3.65263152122498, 0.705373585224152, 0.914846241474152, 0.916945815086365,  1.07761931419373, 0.183956876397133, 0.361502349376678, 2.07936501502991,  2.1812469959259, 0.760839521884918, 3.46650123596191, 1.53558850288391,  0.330000013113022, 3.10121011734009, 0.874662756919861, 1.48345506191254,  1.28475737571716, 1.05200004577637, 7.94806528091431, 0.203309133648872,  1.210857629776, 1.16275024414062, 2.03012037277222, 0.476988017559052,  0.45521292090416, 1.75912058353424, 0.23635022342205, 0.342176884412766,  0.406383603811264, 0.641940057277679, 1, 1.0321592092514, 0.459677428007126,  3.95616054534912, 4.42857122421265, 1.85715568065643, 3.64950156211853,  0.515927731990814, 0.516942024230957), current = c(0.642147123813629,  0.260168313980103, 0.600883364677429, 0.956995725631714, 0.260168313980103,  1.23653173446655, 1.40639424324036, 1.07675218582153, 0.260168313980103,  0.801113069057465, 2.81943321228027, 0.843509554862976, 1.13398694992065,  0.260168313980103, 0.545235216617584, 2.81943321228027, 1.19198870658875,  0.474293291568756, 0.260168313980103, 0.260168313980103, 0.401427298784256,  1.21140944957733, 0.326404929161072, 1.71450614929199, 0.987657248973846,  1.09765684604645, 1.29162395000458, 1.80042016506195, 0.98863410949707,  0.73352712392807, 0.839596688747406, 1.08649599552155, 0.746986508369446,  0.519444465637207, 0.607772707939148, 0.260168313980103, 0.260168313980103,  0.293445110321045, 2.21290326118469, 0.673032999038696, 0.964383006095886,  2.21746039390564, 0.470989525318146, 0.323529422283173, 1.15627562999725,  0.506606042385101, 0.626914441585541, 1.53568696975708, 1.02733683586121,  2.81943321228027, 1.05705952644348, 1.7860734462738, 1.1391396522522,  2.3782639503479, 0.665584921836853, 0.340285390615463, 1.23362839221954,  0.490639895200729, 0.345467031002045, 0.696641504764557, 0.268895357847214,  0.741701245307922, 0.433604329824448, 0.887159526348114, 1.37459933757782,  0.593891382217407, 0.616396367549896, 2.4796838760376, 0.42551463842392,  0.725274741649628), cover = c(0.649999976158142, 0.112769484519958,  0, 0.5163214802742, na, -0.111111111938953, 0.976295828819275,  1, -0.461538463830948, 0.249363869428635, 0, -1.61016952991486,  0, 0.0135302441194654, 0.161290317773819, -0.396551728248596,  -1.61016952991486, 1.04938268661499, 0.804794549942017, -0.00240922393277287,  -0.0130399344488978, 0, 0.267605632543564, 0.831447958946228,  1.6728972196579, 0, -0.00519031146541238, 0, -0.0773333311080933,  0.862068951129913, -0.0281690135598183, 0.32051283121109, 0.332811266183853,  0, 0.304878056049347, 0, 0, 0, -0.0192307699471712, 0.822123885154724,  0.376334100961685, -0.10884353518486, -0.86366331577301, 0, -0.0272628143429756,  0.403465360403061, -0.00689655169844627, -0.935179531574249,  1.6728972196579, 0, -0.215469613671303, 0.818540453910828, 0.538461565971375,  0, 0.861155688762665, 0.0506329126656055, 0.00725478818640113,  0.204545453190804, -0.0206896550953388, 0.640307724475861, 0.0638686120510101,  0.584474861621857, -0.0592105276882648, 0, 0, -0.1875, 0.520370066165924,  0, 0.020833333954215, 0.528301894664764), bank = c(1, 1, 0, 1,  0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1,  0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1,  0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1,  0, 1, 1), inctaxrate = c(0.321428567171097, 0.330000013113022,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.200000002980232,  0, 0, 0, 0, 0, 0.333333343267441, 0, 0, 0, 0, 0, 0, 0, 0.266666680574417,  0.121365360915661, 0, 0.122222222387791, 0, 0, 0, 0.333333343267441,  0.333333343267441, 0.0750062316656113, 0, 0, 0.111111111938953,  0, 0.120408162474632, 0, 0, 0, 0, 0, 0.279069781303406, 0.244000002741814,  0, 0, 0, 0.33002045750618, 0, 0, 0.0624906569719315, 0.330000013113022,  0, 0.324999988079071, 0, 0.149377599358559, 0, 0.0553662702441216,  0, 0, 0.113207548856735), roa = c(0.0205731075257063, 0.0931676998734474,  0.0474829077720642, 0.0433390773832798, 0, -0.0661615133285522,  -0.0800430849194527, 0, -0.0328068025410175, 0.0625798180699348,  0.00515962578356266, -0.0123593285679817, 0.0127931768074632,  0.15384615957737, 0.0070558050647378, -0.0232018567621708, -0.00898461323231459,  0.000345877138897777, 0.00017685342754703, 0.15384615957737,  -0.0723000019788742, 0.000848896452225745, 0.0346779897809029,  0.000424588390160352, -0.050157219171524, -0.0334987603127956,  -0.0147996991872787, -0.095448799431324, 0, 0.000566411763429642,  0.0688963234424591, 0.011312217451632, 0.0289648100733757, -0.00881352927535772,  0.0327677838504314, -0.0589929111301899, 0.0344933792948723,  0.0675862058997154, 0.0171821303665638, 0.000628385052550584,  0.061758890748024, -0.0173888895660639, -0.126888483762741, 0.0338345877826214,  -0.126888483762741, 0.0320554748177528, 0.0926342532038689, -0.00428083632141352,  0.00701754400506616, -0.107918381690979, -0.0434557013213634,  0.00510083045810461, 0.0201207250356674, 0.120576538145542, 0.00154811050742865,  -0.0807265415787697, 0.0736712887883186, -0.00233406270854175,  0.0324379131197929, 0.0111919632181525, 0.108601219952106, 0.0300699304789305,  0.120572723448277, -0.024171270430088, 0.00290694157592952, -0.0900584831833839,  0.074015699326992, 0.0178635232150555, 0.15384615957737, 0.00978401303291321 ), ros = c(0.00610553845763206, 0.0740740746259689, 0.0448514744639397,  0.0400644056499004, 0, -0.384265869855881, -0.132788196206093,  0, -0.482142865657806, 0.0572876073420048, 0.00905489549040794,  -0.0374670810997486, 0.00952717009931803, 0.14293497800827, 0.00246222713030875,  -0.0204290095716715, -0.0368077680468559, 0.000764993892516941,  0.000469307298772037, 0.14293497800827, -0.0350341610610485,  0.000662251666653901, 0.00380316679365933, 0.00167395151220262,  -0.057441484183073, -0.0715096518397331, -0.0480139665305614,  -0.681996643543243, 0, 0.00229357788339257, 0.00945648178458214,  0.032467532902956, 0.0493542142212391, -0.0270233191549778, 0.0651890486478806,  -0.193392232060432, 0.0160091482102871, 0.00762764643877745,  0.0434782616794109, 0.000468509475467727, 0.14293497800827, -0.0191402193158865,  -0.527710855007172, 0.0120000001043081, -0.0867163762450218,  0.013956137932837, 0.14293497800827, -0.0224030781537294, 0.00994475092738867,  -0.608597159385681, -0.277432709932327, 0.00495049497112632,  0.0174070466309786, 0.0611668601632118, 0.00249158823862672,  -0.0597014911472797, 0.0428401492536068, -0.00284711318090558,  0.0574506297707558, 0.014846958220005, 0.0711237564682961, 0.0173334684222937,  0.14293497800827, -0.25862067937851, 0.00270326854661107, -0.426592797040939,  0.0321705527603626, 0.112359553575516, 0.0831858441233635, 0.0143943512812257 ), num_id = c(110811, 5231, 56906, 57829, 109353, 53870, 53447,  3268, 31728, 44842, 109431, 53437, 35768, 53429, 55421, 12707,  28753, 12371, 2213, 40407, 52997, 20414, 11831, 32734, 13940,  53414, 55153, 30755, 8398, 47905, 51851, 30780, 23354, 53407,  48003, 107459, 53394, 53390, 7955, 29718, 51021, 53453, 54348,  597, 46440, 53454, 62729, 32489, 43867, 57861, 11030, 14104,  53370, 50914, 39352, 5956, 53364, 55151, 31386, 9852, 5230, 106943,  18825, 5561, 36645, 27786, 24240, 2994, 61769, 29396)), .names = c("year",  "firmid", "provinceid", "industrycode2", "sales", "cogs", "inventory",  "fixedasset", "totalasset", "stateshare", "foreignshare", "privateshare",  "stateown", "foreignown", "privateown", "mixown", "stateonly",  "mixonly", "foreignonly", "privateonly", "gs", "gm", "gf", "privatize",  "ir", "gm", "ci", "wacc", "salesgrowth", "export", "leverage",  "current", "cover", "bank", "inctaxrate", "roa", "ros", "num_id" ), datalabel = "", time.stamp = "25 sep 2016 11:04", formats = c("%9.0g",  "%9s", "%9.0g", "%9.0g", "%12.0g", "%12.0g", "%12.0g", "%12.0g",  "%12.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g",  "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g",  "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g",  "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g", "%9.0g",  "%9.0g", "%9.0g"), types = c(65527l, 9l, 65527l, 65527l, 65526l,  65526l, 65526l, 65526l, 65526l, 65527l, 65527l, 65527l, 65527l,  65527l, 65527l, 65527l, 65527l, 65527l, 65527l, 65527l, 65527l,  65527l, 65527l, 65527l, 65527l, 65527l, 65527l, 65527l, 65527l,  65527l, 65527l, 65527l, 65527l, 65527l, 65527l, 65527l, 65527l,  65527l), val.labels = structure(c("", "", "", "", "", "", "",  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",  "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""), .names = c("",  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",  "", "", "", "", "")), var.labels = c("", "<b7><a8><c8><u+02f4><fa><c2><eb>",  "", "", "<b2><fa><u+01b7><cf><fa><ca><db><ca><d5><c8><eb>", "<b2><fa><u+01b7><cf><fa><ca><u+06f3><u+0271><be>",  "<b4><e6><bb><f5>", "<b9><u+0336><a8><d7><u+02b2><fa><ba><u+03fc><c6>",  "<d7><u+02b2><fa><d7><u+073c><c6>", "", "", "", "", "", "", "",  "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",  "", "", "", "", "", "group(firmid)"), version = 118l, label.table = list(), expansion.fields = list(), byteorder = "lsf", row.names = c(na,  70l), class = "data.frame") 

data added, know can change 3 modes array 3 modes tensor, consider how change current data frame 3 modes array dimensions "firmid","year",and "all other co-variates except these two"

or image 3 dimensions reference system x-y-z, want x firms, y co-variates, z years

any suggestions?


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -