Fitting exponential decay and pulling out time constant value in R - r

I'm trying to fit some curves from the data below with a mono-exponential "decay". Graphical display is not as important as is pulling out the time constant. the y-axis is pA and the x is time in seconds.
dput(stackover_data)
structure(list(Time = c(0.09990001, 0.19990001, 0.29990001, 0.39990001,
0.49990001, 0.59990001, 0.69990001, 0.79990001, 0.89990001, 0.99990001,
1.09990001, 1.19990001, 1.29990001, 1.39990001, 1.49990001, 1.59990001,
1.69990001, 1.79990001, 1.89990001, 1.99990001, 2.09990001, 2.19990001,
2.29990001, 2.39990001, 2.49990001, 2.59990001, 2.69990001, 2.79990001,
2.89990001, 2.99990001, 3.09990001, 3.19990001, 3.29990001, 3.39990001,
3.49990001, 3.59990001, 3.69990001, 3.79990001, 3.89990001, 3.99990001,
4.09990001, 4.19990001, 4.29990001, 4.39990001, 4.49990001, 4.59990001,
4.69990001, 4.79990001, 4.89990001, 4.99990001, 5.09990001, 5.19990001,
5.29990001, 5.39990001, 5.49990001, 5.59990001, 5.69990001, 5.79990001,
5.89990001, 5.99990001, 6.09990001, 6.19990001, 6.29990001, 6.39990001,
6.49990001, 6.59990001, 6.69990001, 6.79990001, 6.89990001, 6.99990001,
7.09990001, 7.19990001, 7.29990001, 7.39990001, 7.49990001, 7.59990001,
7.69990001, 7.79990001, 7.89990001, 7.99990001, 8.09990001, 8.19990001,
8.29990001, 8.39990001, 8.49990001, 8.59990001, 8.69990001, 8.79990001,
8.89990001, 8.99990001, 9.09990001, 9.19990001, 9.29990001, 9.39990001,
9.49990001, 9.59990001, 9.69990001, 9.79990001, 9.89990001, 9.99990001,
10.09990001, 10.19990001, 10.29990001, 10.39990001, 10.49990001,
10.59990001, 10.69990001, 10.79990001, 10.89990001, 10.99990001,
11.09990001, 11.19990001, 11.29990001, 11.39990001, 11.49990001,
11.59990001, 11.69990001, 11.79990001, 11.89990001, 11.99990001,
12.09990001, 12.19990001, 12.29990001, 12.39990001, 12.49990001,
12.59990001, 12.69990001, 12.79990001, 12.89990001, 12.99990001,
13.09990001, 13.19990001, 13.29990001, 13.39990001, 13.49990001,
13.59990001, 13.69990001, 13.79990001, 13.89990001, 13.99990001,
14.09990001, 14.19990001, 14.29990001, 14.39990001, 14.49990001,
14.59990001, 14.69990001, 14.79990001, 14.89990001, 14.99990001,
15.09990001, 15.19990001, 15.29990001, 15.39990001, 15.49990001,
15.59990001, 15.69990001, 15.79990001, 15.89990001, 15.99990001,
16.09990001, 16.19990001, 16.29990001, 16.39990001, 16.49990001,
16.59990001, 16.69990001, 16.79990001, 16.89990001, 16.99990001,
17.09990001, 17.19990001, 17.29990001, 17.39990001, 17.49990001,
17.59990001, 17.69990001, 17.79990001, 17.89990001, 17.99990001,
18.09990001, 18.19990001, 18.29990001, 18.39990001, 18.49990001,
18.59990001, 18.69990001, 18.79990001, 18.89990001, 18.99990001,
19.09990001, 19.19990001, 19.29990001, 19.39990001, 19.49990001,
19.59990001, 19.69990001, 19.79990001, 19.89990001, 19.99990001
), `Trace 1` = c(-3.08656892325052, 9.36821982641837, 8.13806079083122,
10.7039590839898, 7.25670468903547, 4.31122291688919, 1.77905971163193,
-6.27606834721828, -8.65955381985049, -10.1445673910916, -10.6649772153892,
-6.52301948183154, -11.9757817854835, -0.976254254762154, 0.237467076202677,
-11.8114896779541, -11.0022757370468, -16.1845427042923, 2.70565927469852,
-18.9048281652216, -22.153682283437, -4363.32044948884, -3470.59111611883,
-2877.51064886248, -2253.51505229908, -1876.62974792002, -1541.14546478629,
-1288.26617158403, -1232.52313999354, -1042.98549163259, -938.795146277054,
-810.913567086442, -736.390770574588, -682.044521632168, -638.575324886466,
-596.587948389699, -629.282103146111, -569.200610245336, -587.387817942122,
-521.939307772762, -533.776693538631, -514.782451411908, -445.949395199026,
-451.026618716539, -461.669600651513, -442.372477296489, -426.132547857502,
-452.471101919398, -449.377497412324, -436.817659066873, -487.464805660851,
-442.915455035179, -458.666741489705, -454.990437793055, -455.173154690614,
-426.885702219019, -456.985443835707, -408.869318611773, -442.418742303429,
-407.42593099033, -414.538253423006, -316.036755461507, -248.395118743017,
-198.708015370115, -183.88480278352, -160.041754268138, -139.020785864805,
-123.701641615743, -137.253323547789, -124.240619047461, -121.512859107349,
-113.719386521321, -102.98429740535, -118.721098087137, -109.789471870234,
-122.145399997255, -109.542467905009, -96.6725326170008, -108.16233877188,
-94.1092968366083, -88.0987495250118, -89.2245425850472, -96.3495439993499,
-110.340434956898, -98.8777265479938, -88.0674013452629, -102.755317774957,
-91.0752842494157, -107.959830375198, -78.8424385901398, -93.7743443479161,
-98.3591889757604, -72.3214090579355, -85.6296201608712, -112.596656084088,
-115.518068650615, -110.973655632476, -78.8021307215932, -85.6443070182152,
-93.1744356389988, -100.483987323044, -87.6672104421484, -83.6481077757535,
-82.1465876740715, -86.7838666454595, -75.9066755520263, -86.6416980998645,
-88.9405806921788, -74.0592581080291, -86.3433338300531, -93.5114839187431,
-91.1875849041866, -82.7018083540351, -102.859075734953, -82.1494206590809,
-79.2197323780198, -78.1558787387238, -86.2649418863144, -93.5271994290692,
-84.6678528566242, -71.4828270654073, -69.5618263581887, -67.2920558863641,
-58.1490330439793, -59.8163238740351, -73.6957797622946, -61.7673947702343,
-63.6492255747164, -64.043638367468, -73.8301991524909, -69.3055992018769,
-65.9342860783478, -74.9891521715357, -74.5779808619617, -69.9029875902787,
-69.746935396023, -71.35455530782, -73.5279471991205, -77.8000626250279,
-74.6065254864801, -64.0834786591292, -45.1346212136811, -43.1615385011179,
-42.554841323715, -50.276566542849, -56.1940469314277, -49.6368473019083,
-53.9842269565738, -54.1480156577708, -48.2160751112714, -43.2902743874793,
-46.4358385791469, -58.4459814967147, -49.0443619038303, -56.8007684056415,
-56.3345802020277, -40.1704617527471, -38.2624410086947, -39.9339279963857,
-27.7637250414188, -40.8686520798649, -30.9246406597275, -32.70021580322,
-28.7536071219405, -32.4403271637661, -30.3389870650563, -23.2866770834185,
-40.349370835336, -39.7478049410975, -38.4648592612063, -37.4191914226093,
-52.1259539643142, -38.0993644763616, -37.5493511061199, -25.0794144286873,
-32.6165749053184, -17.2616237291667, -32.1515419380766, -27.0814392288745,
-26.2440551871993, -17.5882979851251, -19.852012057918, -22.1408312947152,
-21.3395092026716, -28.0789344732281, -19.6443281019371, -26.6585778398899,
-24.2994817465722, -27.847437388783, -22.0565059455712, -24.8747905836351,
-30.7544250721296, -29.9924061105416, -22.5728855329732, -24.9767037068316,
-18.8208568928653, -10.7306087216159, -16.4281210876173, -19.3057174287183,
-15.9745523586581), `Trace 2` = c(5.94927992143286, 1.42121402161905,
6.78788136514507, 3.33970424403748, -3.73956433922802, -7.3097330836793,
-9.18242380095097, 3.29952017048882, 5.17208246028, 1.53238537592179,
6.90832098860733, 3.16748380079213, 5.49988319742749, 3.86758484926656,
11.981378748128, -0.208159377585758, -7.2781503569274, 1.71389537416221,
-4.77614396689646, -0.561115871778583, -14.5385068323377, -4944.63006397872,
-3891.23141079918, -3065.66300899921, -2527.61853791531, -2060.05223709386,
-1763.27814995793, -1451.77884853301, -1368.42409410389, -1115.3385743493,
-990.942590410893, -852.951182088994, -920.516421149141, -860.486324532349,
-751.257935697359, -768.757880984424, -713.935725464811, -715.011716140783,
-616.355633698422, -672.133827760044, -629.418857335266, -607.342562427532,
-599.657392949772, -553.265193759536, -572.878306401819, -583.153736972572,
-589.661926862833, -527.552306430313, -553.672277977987, -539.906254466276,
-525.491319968336, -564.876755897633, -505.363603776286, -575.649358123809,
-497.897048596953, -544.360501913781, -483.501835830955, -533.085516954168,
-478.007776808595, -453.333986756674, -447.125338584774, -380.268661132557,
-253.127091546528, -227.877427383931, -191.488369613846, -166.799480062655,
-171.446527550207, -156.775073739292, -148.804014388301, -151.79670303645,
-152.599645619669, -113.40778617347, -133.161498039771, -129.929086626311,
-156.827022418459, -146.618934465797, -94.20997521855, -124.514491421933,
-89.8538131075507, -91.6500841191965, -113.887119052802, -109.971138752404,
-122.532101557384, -107.714865018275, -120.258046104427, -133.296582343699,
-111.726093380577, -121.533575165211, -93.2177144160483, -97.3820468959891,
-111.294540122284, -100.913019601926, -90.8456358331201, -94.143801546019,
-89.9179990101121, -79.3197988311624, -87.0020882554621, -103.315348613102,
-92.6091563297179, -87.3900461813473, -106.61173718685, -117.18534688083,
-106.417237368758, -114.977458547258, -101.759575332149, -93.2156781534656,
-79.4452885332048, -83.8035016923155, -85.7770898942133, -80.151862850598,
-72.4787832080729, -75.4887322569144, -70.8074563945233, -76.9714115362765,
-74.2305756099668, -72.7994824773122, -86.4890002605112, -68.5241155035978,
-76.723559709657, -60.5721619300473, -64.185161607482, -81.0777473166996,
-59.7023719535658, -48.0615168793405, -63.7668096308392, -69.0412888697281,
-70.9894443873153, -48.8366672284658, -43.1003899300401, -50.5591327356918,
-65.184353265464, -52.2850955061746, -66.0074402595226, -69.3081002474696,
-69.3876079446205, -53.0919105504865, -69.3289906081927, -63.5198462609014,
-70.9316181916525, -68.753726760587, -57.1360889764902, -45.7297495037924,
-45.0225501894778, -45.7487568762369, -46.486850874694, -46.7437348684622,
-41.1396209831975, -38.5056250833188, -49.8076229939374, -46.9868446480308,
-38.4639795698766, -40.8336417843587, -49.9810721301961, -58.7820616810459,
-51.4348042554539, -56.9132093579117, -53.527642322397, -49.7620292214747,
-54.6821412367706, -66.7962460110546, -52.0791798888695, -43.3022792658504,
-47.5584813904168, -36.3352478868053, -39.8699383685185, -43.9973042247199,
-49.3191665577514, -42.0818922168797, -37.7538461067954, -29.1591142899914,
-31.6815992654018, -35.3664789321372, -29.6435427630652, -45.5528322348158,
-37.0568327299924, -29.6739001502498, -37.0952936191428, -44.1786405275305,
-50.929131558954, -31.7842698176079, -31.4300485665082, -33.960404707688,
-34.0566040705914, -41.2299273666286, -30.1094672132779, -28.6802701495622,
-37.1973277887207, -31.7114680610898, -32.5450840790921, -28.5823680785893,
-27.5268500574853, -15.2389866754792, -19.2079199191329, -28.9156878395334,
-16.5863741697772, -31.6638747515138, -34.679018047114, -32.6358481677933,
-26.3463300811612, -18.542719903123), `Trace 3` = c(4.74984904312473,
-6.83237755613888, -4.15774846489683, 0.0116753456567835, 4.3974208810568,
8.56175743226069, -0.271281722577697, -10.7982854290066, -18.31704442037,
-15.7577103721081, -20.5775487342614, -17.7307614062074, -14.2844531791322,
-5.43267691733291, 2.52755064598145, -0.79977817636393, -8.07074631773528,
-14.6631228094247, -9.70657043283029, -11.4521183354252, -10.8401698276907,
-5495.45466682125, -4324.53856178012, -3525.03574657791, -2774.37269062517,
-2175.8494069729, -1790.54797875842, -1574.71991002551, -1342.90235937345,
-1212.59715782746, -1042.56659527622, -1006.18885759924, -962.27473179716,
-870.459562514915, -847.89784200018, -770.205392585522, -709.279500982242,
-740.484104629636, -739.054108223511, -645.039948927494, -712.347389757369,
-609.734365947307, -613.120930696929, -630.805982834916, -581.828460576409,
-608.843958294059, -602.432567890874, -547.023947351376, -571.475614300591,
-561.707380041648, -535.094375334464, -578.783728464712, -535.290908514374,
-489.922390143035, -522.824368605682, -520.322259788742, -556.271028784585,
-536.474251127913, -546.811709881227, -541.304029428261, -563.702125503968,
-460.326259578172, -348.718859066443, -261.740363110507, -244.084411205067,
-182.533320181224, -205.356578064485, -157.759947570376, -162.214202634405,
-180.011654146528, -176.904445787135, -167.116794266109, -163.416234638164,
-155.821745831568, -134.760994564946, -131.702791057298, -138.598664148971,
-139.818370538306, -134.700400696581, -137.275258643317, -119.921721377143,
-118.187525264885, -118.490007264421, -130.391338033262, -138.05114734155,
-127.505366899025, -132.636233878671, -123.490111075107, -113.42942794286,
-122.40925776411, -114.48254277334, -122.78054774327, -90.9528981496313,
-96.9508488566491, -107.842237007564, -91.0521871208113, -91.0347011279681,
-85.7054147126896, -89.7363815316723, -77.6588521980595, -76.6733051688234,
-85.821987540449, -90.3216600489126, -66.1137192454051, -77.7157754909198,
-89.8637060331546, -80.9149315468257, -71.7434481475478, -97.6600776026528,
-103.405900069071, -83.7502802699966, -77.4600968679799, -77.8705250264031,
-78.9012879762878, -87.4698127883497, -92.9587198547098, -96.1222986385502,
-91.1990314226718, -83.8744116889207, -61.7720026226848, -83.6616594930646,
-91.3899042204887, -74.2552104995002, -94.3117384183545, -81.130091800586,
-87.6638514042855, -79.061763018934, -78.7472359255489, -72.9642062301352,
-83.5759889935287, -74.066505526926, -62.6191749912397, -75.7150349466975,
-71.8704211546101, -68.4798935028027, -77.0470926055507, -76.6024078920054,
-66.5760393943856, -77.8848130194484, -77.5151449198185, -65.5482413040489,
-47.6087884294611, -35.6865291924552, -47.9648700291328, -62.8176093048552,
-48.969044800301, -46.853228499419, -52.562083189922, -58.7677963803543,
-63.6615259259388, -51.7351340481719, -54.5967510836755, -54.1294816023731,
-47.7621427567758, -40.9244974392914, -50.5286026229961, -45.9961132210891,
-43.143208905187, -43.8395623054062, -49.3326618452772, -48.308625153823,
-44.9833219970479, -32.4206723427767, -45.6628898472981, -41.4748918817457,
-43.6438737242104, -42.9844450147366, -30.3729810016378, -44.9519080631137,
-45.8241111308495, -40.4766896430523, -40.3007872752484, -46.4770136239361,
-49.3759491415156, -46.0844075639024, -34.3090862431636, -26.6047381016158,
-28.9119815377167, -33.1619464253006, -37.3813739690468, -46.5001186141503,
-54.5235621985407, -44.5233400090119, -55.2272273265567, -48.088333647706,
-55.3522589332341, -52.8146474401922, -60.1877313269088, -48.2512741329643,
-34.8540879147507, -55.2019332852645, -50.8488894007021, -49.9600753927381,
-48.5654335180739, -47.8918651630979, -45.1405419376454, -40.8504490169926,
-38.5815843253789, -45.001677748311, -43.0547862406721)), .Names = c("Time",
"Trace 1", "Trace 2", "Trace 3"), row.names = c(1000L, 2000L,
3000L, 4000L, 5000L, 6000L, 7000L, 8000L, 9000L, 10000L, 11000L,
12000L, 13000L, 14000L, 15000L, 16000L, 17000L, 18000L, 19000L,
20000L, 21000L, 22000L, 23000L, 24000L, 25000L, 26000L, 27000L,
28000L, 29000L, 30000L, 31000L, 32000L, 33000L, 34000L, 35000L,
36000L, 37000L, 38000L, 39000L, 40000L, 41000L, 42000L, 43000L,
44000L, 45000L, 46000L, 47000L, 48000L, 49000L, 50000L, 51000L,
52000L, 53000L, 54000L, 55000L, 56000L, 57000L, 58000L, 59000L,
60000L, 61000L, 62000L, 63000L, 64000L, 65000L, 66000L, 67000L,
68000L, 69000L, 70000L, 71000L, 72000L, 73000L, 74000L, 75000L,
76000L, 77000L, 78000L, 79000L, 80000L, 81000L, 82000L, 83000L,
84000L, 85000L, 86000L, 87000L, 88000L, 89000L, 90000L, 91000L,
92000L, 93000L, 94000L, 95000L, 96000L, 97000L, 98000L, 99000L,
100000L, 101000L, 102000L, 103000L, 104000L, 105000L, 106000L,
107000L, 108000L, 109000L, 110000L, 111000L, 112000L, 113000L,
114000L, 115000L, 116000L, 117000L, 118000L, 119000L, 120000L,
121000L, 122000L, 123000L, 124000L, 125000L, 126000L, 127000L,
128000L, 129000L, 130000L, 131000L, 132000L, 133000L, 134000L,
135000L, 136000L, 137000L, 138000L, 139000L, 140000L, 141000L,
142000L, 143000L, 144000L, 145000L, 146000L, 147000L, 148000L,
149000L, 150000L, 151000L, 152000L, 153000L, 154000L, 155000L,
156000L, 157000L, 158000L, 159000L, 160000L, 161000L, 162000L,
163000L, 164000L, 165000L, 166000L, 167000L, 168000L, 169000L,
170000L, 171000L, 172000L, 173000L, 174000L, 175000L, 176000L,
177000L, 178000L, 179000L, 180000L, 181000L, 182000L, 183000L,
184000L, 185000L, 186000L, 187000L, 188000L, 189000L, 190000L,
191000L, 192000L, 193000L, 194000L, 195000L, 196000L, 197000L,
198000L, 199000L, 200000L), class = "data.frame")
I've tried doing lm(y~x)but it doesn't seem to get the right answer (verified the right answer in Igor) and obviously this is because its a linear model and not a exponential. Any all suggestions are welcomed. I'm struggling on this!
Thanks all!

names(DF) <- make.names(names(DF))
plot(Trace.1 ~ Time, data = DF)
#remove the initial values that clearly don't follow the model
DF1 <- DF[-seq_len(which((diff(DF$Trace.1) < -1e3))),]
plot(Trace.1 ~ Time, data = DF1)
fit <- nls(Trace.1 ~ SSasymp(Time, Asym, R0, lrc), data = DF1)
summary(fit)
coef(fit)
help("SSasymp") #for an explanation of the parameters
lines(DF1$Time, predict(fit))

Related

GSVA function to calculate ssGSEA score

I'm trying to run an R code for calculating the ssGSEA score between a gene expression dataset and a gene list.
The function I'm trying to run is:
GSVAtumor_UCS_Epi<-gsva(file, EM_gene_signature_tumor_KS_Epi_list, method=c("gsva", "ssgsea", "zscore", "plage"))
I'm facing the same error and two warning messages every time I run the code and there is not much information available for it over the internet for the same:
Error in relist(v, part) :
shape of 'skeleton' is not compatible with 'NROW(flesh)'
In addition: Warning messages:
1: In .filterFeatures(expr, method) :
6171 genes with constant expression values throuhgout the samples.
2: In .filterFeatures(expr, method) :
Since argument method!="ssgsea", genes with constant expression values are discarded.
Here EM_gene_signature_tumor_KS_Epi_list is
list(structure(list(...1 = c("KRT19", "AGR2", "RAB25", "CDH1",
"ERBB3", "FXYD3", "SLC44A4", "S100P", "SCNN1A", "GALNT3", "PRSS8",
"ELF3", "CEACAM6", "TMPRSS4", "CLDN7", "TACSTD2", "CLDN3", "EPCAM",
"SPINT1", "TSPAN1", "PLS1", "TMEM30B", "PRR15L", "KRT8", "ST14",
NA, "RBM47", "S100A14", "C1orf106", "NQO1", "TOX3", "PTK6", "TFF1",
"CLDN4", "GPRC5A", "TJP3", "KRT18", "MAP7", "CKMT1A", "ESRP1",
"MUC1", "SPINT2", "ESRP2", "CDS1", "PPAP2C", "CEACAM7", "TTC39A",
"OVOL2", "EHF", "AP1M2", "CEACAM5", "LAD1", "ARHGAP8", "TFF3",
"JUP", "CD24", "TMC5", "MLPH", "ELMO3", "ERBB2", "LLGL2", "DDR1",
"FA2H", "CBLC", "TMPRSS2", "LSR", "PERP", "POF1B", "MYO5C", "RAB11FIP1",
"MAPK13", "KRT7", "CEACAM1", "CXADR", "ATP2C2", "RNF128", "MPZL2",
"EPS8L1", "GALNT7", "CORO2A", "BCAS1", "TPD52", "ARHGAP32", "FUT2",
"OR7E14P", "GALE", "GRHL2", "BIK", "RAPGEFL1", "STYK1", "F11R",
"PKP3", "CYB561", "SH3YL1", "GDF15", "PSCA", "EZR", "TJP2", "FGFR3",
"FUT3", "BSPRY", "TOM1L1", "IRF6", "EPB41L4B", "OCLN", "LRRC1",
"C19orf21", "ABHD11", "EPS8L2", "MYO6", "TSPAN8", "MST1R", "SLC16A5",
"GPR56", "AZGP1", "TOB1", "SLC35A3", "TRPM4", "PHLDA2", "VAMP8",
"SLC22A18", "AKR1B10", "VAV3", "SPAG1", "ABCC3", "SYNGR2", "STAP2",
"C4orf19", "PPL", "PLLP", "DSG2", "HDHD3", "CD2AP", "MANSC1",
"DHCR24", "EPN3", "TUFT1", "GMDS", "EXPH5", "DSP", "SDC4", "IL20RA",
"FAM174B", "PTPRF", "SORD")), row.names = c(NA, -145L), class = c("tbl_df",
"tbl", "data.frame")))
And file is
new("ExpressionSet", experimentData = new("MIAME", name = "",
lab = "", contact = "", title = "", abstract = "", url = "",
pubMedIds = "", samples = list(), hybridizations = list(),
normControls = list(), preprocessing = list(), other = list(),
.__classVersion__ = new("Versions", .Data = list(c(1L, 0L,
0L), c(1L, 1L, 0L)))), assayData = <environment>, phenoData = new("AnnotatedDataFrame",
varMetadata = structure(list(labelDescription = "state"), row.names = "state", class = "data.frame"),
data = structure(list(state = c("TCGA-N6-A4V9-01A", "TCGA-QM-A5NM-01A",
"TCGA-N8-A4PM-01A", "TCGA-NG-A4VU-01A", "TCGA-NG-A4VW-01A",
"TCGA-N8-A4PN-01A", "TCGA-N5-A4RA-01A", "TCGA-N6-A4VD-01A",
"TCGA-N7-A4Y8-01A", "TCGA-N6-A4VE-01A", "TCGA-N5-A59F-01A",
"TCGA-N9-A4PZ-01A", "TCGA-N6-A4VF-01A", "TCGA-NF-A5CP-01A",
"TCGA-N6-A4VC-01A", "TCGA-N5-A4RF-01A", "TCGA-N8-A4PL-01A",
"TCGA-ND-A4WA-01A", "TCGA-N5-A4RU-01A", "TCGA-N9-A4Q3-01A",
"TCGA-NA-A4R1-01A", "TCGA-N7-A4Y5-01A", "TCGA-N5-A4RV-01A",
"TCGA-QN-A5NN-01A", "TCGA-N9-A4Q1-01A", "TCGA-N5-A59E-01A",
"TCGA-NA-A4QW-01A", "TCGA-N5-A4RM-01A", "TCGA-NF-A4X2-01A",
"TCGA-N5-A4RN-01A", "TCGA-N5-A4RS-01A", "TCGA-N8-A4PQ-01A",
"TCGA-N9-A4Q4-01A", "TCGA-NA-A4QY-01A", "TCGA-N5-A4RJ-01A",
"TCGA-N5-A4RD-01A", "TCGA-NA-A5I1-01A", "TCGA-NA-A4R0-01A",
"TCGA-NA-A4QV-01A", "TCGA-N7-A4Y0-01A", "TCGA-N5-A4R8-01A",
"TCGA-NF-A4WU-01A", "TCGA-N6-A4VG-01A", "TCGA-N8-A4PI-01A",
"TCGA-N8-A4PO-01A", "TCGA-N8-A4PP-01A", "TCGA-ND-A4WF-01A",
"TCGA-NA-A4QX-01A", "TCGA-N9-A4Q7-01A", "TCGA-N5-A4RO-01A",
"TCGA-N5-A4RT-01A", "TCGA-NF-A4WX-01A", "TCGA-N7-A59B-01A",
"TCGA-ND-A4W6-01A", "TCGA-N8-A56S-01A", "TCGA-ND-A4WC-01A"
)), row.names = c("TCGA-N6-A4V9-01A", "TCGA-QM-A5NM-01A",
"TCGA-N8-A4PM-01A", "TCGA-NG-A4VU-01A", "TCGA-NG-A4VW-01A",
"TCGA-N8-A4PN-01A", "TCGA-N5-A4RA-01A", "TCGA-N6-A4VD-01A",
"TCGA-N7-A4Y8-01A", "TCGA-N6-A4VE-01A", "TCGA-N5-A59F-01A",
"TCGA-N9-A4PZ-01A", "TCGA-N6-A4VF-01A", "TCGA-NF-A5CP-01A",
"TCGA-N6-A4VC-01A", "TCGA-N5-A4RF-01A", "TCGA-N8-A4PL-01A",
"TCGA-ND-A4WA-01A", "TCGA-N5-A4RU-01A", "TCGA-N9-A4Q3-01A",
"TCGA-NA-A4R1-01A", "TCGA-N7-A4Y5-01A", "TCGA-N5-A4RV-01A",
"TCGA-QN-A5NN-01A", "TCGA-N9-A4Q1-01A", "TCGA-N5-A59E-01A",
"TCGA-NA-A4QW-01A", "TCGA-N5-A4RM-01A", "TCGA-NF-A4X2-01A",
"TCGA-N5-A4RN-01A", "TCGA-N5-A4RS-01A", "TCGA-N8-A4PQ-01A",
"TCGA-N9-A4Q4-01A", "TCGA-NA-A4QY-01A", "TCGA-N5-A4RJ-01A",
"TCGA-N5-A4RD-01A", "TCGA-NA-A5I1-01A", "TCGA-NA-A4R0-01A",
"TCGA-NA-A4QV-01A", "TCGA-N7-A4Y0-01A", "TCGA-N5-A4R8-01A",
"TCGA-NF-A4WU-01A", "TCGA-N6-A4VG-01A", "TCGA-N8-A4PI-01A",
"TCGA-N8-A4PO-01A", "TCGA-N8-A4PP-01A", "TCGA-ND-A4WF-01A",
"TCGA-NA-A4QX-01A", "TCGA-N9-A4Q7-01A", "TCGA-N5-A4RO-01A",
"TCGA-N5-A4RT-01A", "TCGA-NF-A4WX-01A", "TCGA-N7-A59B-01A",
"TCGA-ND-A4W6-01A", "TCGA-N8-A56S-01A", "TCGA-ND-A4WC-01A"
), class = "data.frame"), dimLabels = c("sampleNames", "sampleColumns"
), .__classVersion__ = new("Versions", .Data = list(c(1L,
1L, 0L)))), featureData = new("AnnotatedDataFrame", varMetadata = structure(list(
labelDescription = character(0)), row.names = character(0), class = "data.frame"),
data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("5_8S_rRNA",
"5S_rRNA", "7SK", "A1BG", "A1BG-AS1", "A1CF", "A2M", "A2M-AS1",
"A2ML1", "A2ML1-AS1", "A2ML1-AS2", "A2MP1", "A3GALT2", "A4GALT",
"A4GNT", "AA06", "AAAS", "AACS", "AACSP1", "AADAC", "AADACL2",
"AADACL2-AS1", "AADACL3", "AADACL4", "AADACP1", "AADAT",
"AAED1", "AAGAB", "AAK1", "AAMDC", "AAMP", "AANAT", "AAR2",
"AARD", "AARS", "AARS2", "AARSD1", "AARSP1", "AASDH", "AASDHPPT",
"AASS", "AATBC", "AATF", "AATK", "AATK-AS1", "AB015752.3",
"AB019438.66", "AB019440.50", "AB019441.29", "ABALON", "ABAT",
"ABBA01017803.1", "ABC12-47043100G14.2", "ABC12-47964100C23.1",
"ABC12-49244600F4.4", "ABC14-1080714F14.1", "ABC7-42391500H16.2",
"ABC7-42418200C9.1", "ABC7-43041300I9.1", "ABC7-481722F1.1",
"ABCA1", "ABCA10", "ABCA11P", "ABCA12", "ABCA13", "ABCA17P",
"ABCA2", "ABCA3", "ABCA4", "ABCA5", "ABCA6", "ABCA7", "ABCA8",
"ABCA9", "ABCA9-AS1", "ABCB1", "ABCB10", "ABCB10P1", "ABCB10P3",
"ABCB10P4", "ABCB11", "ABCB4", "ABCB5", "ABCB6", "ABCB7",
"ABCB8", "ABCB9", "ABCC1", "ABCC10", "ABCC11", "ABCC12",
"ABCC13", "ABCC2", "ABCC3", "ABCC4", "ABCC5", "ABCC5-AS1",
"ABCC6", "ABCC6P1", "ABCC6P2", "ABCC8", "ABCC9", "ABCD1",
"ABCD1P2", "ABCD1P3", "ABCD1P4", "ABCD1P5", "ABCD2", "ABCD3",
"ABCD4", "ABCE1", "ABCF1", "ABCF2", "ABCF2P1", "ABCF2P2",
"ABCF3", "ABCG1", "ABCG2", "ABCG4", "ABCG5", "ABCG8", "ABHD1",
"ABHD10", "ABHD11", "ABHD11-AS1", "ABHD12", "ABHD12B", "ABHD13",
"ABHD14A", "ABHD14A-ACY1", "ABHD14B", "ABHD15", "ABHD15-AS1",
"ABHD16A", "ABHD16B", "ABHD17A", "ABHD17AP1", "ABHD17AP3",
"ABHD17AP4", "ABHD17AP6", "ABHD17AP9", "ABHD17B", "ABHD17C",
"ABHD2", "ABHD3", "ABHD4", "ABHD5", "ABHD6", "ABHD8", "ABI1",
"ABI2", "ABI3", "ABI3BP", "ABL1", "ABL2", "ABLIM1", "ABLIM2",
"ABLIM3", "ABO", "ABR", "ABRA", "ABRACL", "ABT1", "ABT1P1",
"ABTB1", "ABTB2", "AC000003.1", "AC000029.1", "AC000032.2",
"AC000036.4", "AC000041.10", "AC000041.8", "AC000067.1",
"AC000068.10", "AC000068.5", "AC000068.9", "AC000077.2",
"AC000078.5", "AC000081.2", "AC000089.3", "AC000095.11",
"AC000095.9", "AC000099.1", "AC000110.1", "AC000111.3", "AC000111.4",
"AC000111.5", "AC000111.6", "AC000120.7", "AC000123.2", "AC000123.3",
"AC000123.4", "AC000124.1", "AC000354.1", "AC000362.1", "AC000367.1",
"AC000370.2", "AC000374.1", "AC000403.1", "AC000403.4", "AC001226.7",
"AC002044.1", "AC002044.3", "AC002044.4", "AC002056.3", "AC002056.5",
"AC002059.10", "AC002064.4", "AC002064.5", "AC002064.7",
"AC002066.1", "AC002069.5", "AC002069.6", "AC002070.1", "AC002072.1",
"AC002075.3", "AC002075.4", "AC002076.10", "AC002115.5",
"AC002115.9", "AC002116.7", "AC002116.8", "AC002117.1", "AC002127.2",
"AC002127.4", "AC002128.5", "AC002306.1", "AC002310.10",
"AC002310.12", "AC002310.13", "AC002310.14", "AC002310.17",
"AC002310.7", "AC002314.4", "AC002331.1", "AC002365.5", "AC002366.1",
"AC002366.3", "AC002368.4", "AC002383.2", "AC002386.1", "AC002389.1",
"AC002395.1", "AC002398.11", "AC002398.12", "AC002398.13",
"AC002398.9", "AC002400.1", "AC002401.1", "AC002407.1", "AC002429.1",
"AC002429.4", "AC002429.5", "AC002451.3", "AC002454.1", "AC002456.2",
"AC002463.3", "AC002464.1", "AC002465.2", "AC002467.7", "AC002472.11",
"AC002480.2", "AC002480.3", "AC002480.4", "AC002480.5", "AC002486.2",
"AC002486.3", "AC002511.2", "AC002511.3", "AC002519.6", "AC002519.8",
"AC002523.1", "AC002530.1", "AC002539.1", "AC002539.2", "AC002542.2",
"AC002543.2", "AC002550.5", "AC002550.6", "AC002551.1", "AC002553.4",
"AC002558.1", "AC002978.1", "AC002979.1", "AC002981.1", "AC002984.2",
"AC002985.3", "AC003001.1", "AC003002.4", "AC003002.6", "AC003003.5",
"AC003005.2", "AC003005.4", "AC003006.1", "AC003006.7", "AC003009.1",
"AC003045.1", "AC003075.4", "AC003080.4", "AC003084.2", "AC003088.1",
"AC003090.1", "AC003092.1", "AC003092.2", "AC003101.1", "AC003104.1",
"AC003658.1", "AC003664.1", "AC003666.1", "AC003681.1", "AC003682.16",
"AC003682.17", "AC003688.1", "AC003956.1", "AC003958.2",
"AC003958.6", "AC003968.1", "AC003973.1", "AC003973.3", "AC003973.4",
"AC003973.5", "AC003984.1", "AC003985.1", "AC003986.5", "AC003986.6",
"AC003986.7", "AC003988.1", "AC003989.3", "AC003989.4", "AC003991.3",
"AC004000.1", "AC004000.2", "AC004004.2", "AC004006.2", "AC004009.1",
"AC004009.2", "AC004009.3", "AC004012.1", "AC004014.3", "AC004014.4",
"AC004016.1", "AC004019.10", "AC004019.13", "AC004022.7",
"AC004022.8", "AC004041.2", "AC004051.2", "AC004052.1", "AC004053.1",
"AC004053.2", "AC004054.1", "AC004057.1", "AC004062.2", "AC004063.1",
"AC004066.2", "AC004066.3", "AC004067.5", "AC004069.1", "AC004069.2",
"AC004070.1", "AC004074.4", "AC004076.5", "AC004076.7", "AC004076.9",
"AC004079.1", "AC004108.1", "AC004112.4", "AC004112.5", "AC004112.7",
"AC004125.3", "AC004129.7", "AC004129.9", "AC004156.3", "AC004158.1",
"AC004158.3", "AC004159.1", "AC004160.4", "AC004166.6", "AC004221.2",
"AC004231.2", "AC004237.1", "AC004257.1", "AC004381.6", "AC004381.7",
"AC004383.3", "AC004386.3", "AC004386.4", "AC004447.2", "AC004448.2",
"AC004448.5", "AC004449.6", "AC004453.1", "AC004453.8", "AC004458.1",
"AC004460.1", "AC004461.4", "AC004470.1", "AC004471.10",
"AC004471.9", "AC004477.1", "AC004485.3", "AC004490.1", "AC004492.1",
"AC004510.3", "AC004520.1", "AC004535.2", "AC004538.3", "AC004540.4",
"AC004540.5", "AC004541.1", "AC004543.1", "AC004543.2", "AC004549.6",
"AC004552.1", "AC004593.3", "AC004595.1", "AC004603.4", "AC004623.2",
"AC004623.3", "AC004637.1", "AC004655.1", "AC004656.1", "AC004673.1",
"AC004687.1", "AC004691.1", "AC004691.5", "AC004692.4", "AC004692.5",
"AC004699.1", "AC004702.2", "AC004744.3", "AC004745.1", "AC004754.3",
"AC004769.1", "AC004775.5", "AC004791.2", "AC004812.1", "AC004813.1",
"AC004816.1", "AC004819.1", "AC004824.1", "AC004824.2", "AC004832.1",
"AC004837.1", "AC004837.3", "AC004837.4", "AC004837.5", "AC004840.8",
"AC004846.1", "AC004850.1", "AC004854.4", "AC004854.5", "AC004862.6",
"AC004866.1", "AC004866.3", "AC004869.2", "AC004869.3", "AC004870.3",
"AC004870.4", "AC004870.5", "AC004875.1", "AC004878.2", "AC004878.8",
"AC004893.10", "AC004893.11", "AC004895.1", "AC004895.4",
"AC004899.3", "AC004901.1", "AC004906.3", "AC004911.2", "AC004915.1",
"AC004920.2", "AC004920.3", "AC004924.1", "AC004932.1", "AC004938.5",
"AC004941.3", "AC004941.5", "AC004943.1", "AC004945.1", "AC004946.1",
"AC004947.2", "AC004951.5", "AC004951.6", "AC004953.1", "AC004967.7",
"AC004969.1", "AC004980.1", "AC004980.10", "AC004980.11",
"AC004980.7", "AC004980.8", "AC004980.9", "AC004984.1", "AC004985.12",
"AC004987.10", "AC004987.9", "AC004988.1", "AC005000.1",
"AC005007.3", "AC005008.2", "AC005008.3", "AC005009.1", "AC005009.2",
"AC005013.5", "AC005014.5", "AC005017.2", "AC005019.2", "AC005019.3",
"AC005020.1", "AC005024.1", "AC005027.3", "AC005033.6", "AC005034.2",
"AC005037.1", "AC005037.3", "AC005037.4", "AC005037.6", "AC005040.3",
"AC005041.11", "AC005042.1", "AC005042.2", "AC005042.3",
"AC005042.4", "AC005042.5", "AC005048.1", "AC005052.1", "AC005062.2",
"AC005071.1", "AC005071.2", "AC005071.3", "AC005071.4", "AC005076.5",
"AC005077.12", "AC005077.14", "AC005077.5", "AC005077.7",
"AC005077.8", "AC005077.9", "AC005082.1", "AC005082.12",
"AC005083.1", "AC005086.1", "AC005086.2", "AC005086.3", "AC005088.1",
"AC005094.2", "AC005102.1", "AC005104.3", "AC005105.2", "AC005150.1",
"AC005150.2", "AC005150.3", "AC005152.3", "AC005154.6", "AC005154.7",
"AC005154.8", "AC005158.1", "AC005159.1", "AC005160.3", "AC005162.4",
"AC005162.5", "AC005176.1", "AC005176.2", "AC005176.3", "AC005178.1",
"AC005187.1", "AC005189.6", "AC005197.2", "AC005204.1", "AC005215.1",
"AC005220.3", "AC005224.2", "AC005227.1", "AC005229.1", "AC005229.5",
"AC005229.7", "AC005235.1", "AC005237.2", "AC005237.4", "AC005251.3",
"AC005253.2", "AC005253.4", "AC005255.3", "AC005255.5", "AC005255.6",
"AC005256.1", "AC005262.2", "AC005262.3", "AC005262.4", "AC005264.2",
"AC005276.1", "AC005281.1", "AC005281.2", "AC005284.1", "AC005284.2",
"AC005288.1", "AC005300.5", "AC005301.8", "AC005304.1", "AC005306.3",
"AC005307.1", "AC005307.3", "AC005324.6", "AC005324.7", "AC005329.7",
"AC005330.2", "AC005336.4", "AC005336.5", "AC005339.1", "AC005339.2",
"AC005351.1", "AC005355.1", "AC005355.2", "AC005355.3", "AC005357.1",
"AC005358.3", "AC005363.11", "AC005363.9", "AC005371.1",
"AC005375.1", "AC005387.2", "AC005387.3", "AC005391.2", "AC005392.13",
"AC005394.1", "AC005412.1", "AC005477.1", "AC005480.1", "AC005481.5",
"AC005487.2", "AC005488.11", "AC005498.1", "AC005498.3",
"AC005498.4", "AC005510.3", "AC005513.1", "AC005514.2", "AC005517.3",
"AC005518.2", "AC005519.4", "AC005522.6", "AC005522.7", "AC005523.2",
"AC005523.3", "AC005532.5", "AC005534.6", "AC005534.8", "AC005537.2",
"AC005538.1", "AC005538.3", "AC005538.5", "AC005539.2", "AC005540.1",
"AC005540.3", "AC005546.2", "AC005549.1", "AC005549.2", "AC005550.3",
"AC005550.5", "AC005559.3", "AC005562.1", "AC005562.2", "AC005578.3",
"AC005588.2", "AC005592.1", "AC005592.2", "AC005592.3", "AC005593.2",
"AC005597.1", "AC005599.1", "AC005606.14", "AC005606.15",
"AC005609.16", "AC005609.17", "AC005609.18", "AC005609.19",
"AC005609.2", "AC005609.20", "AC005614.3", "AC005614.5",
"AC005616.1", "AC005616.2", "AC005618.6", "AC005618.8", "AC005618.9",
"AC005621.1", "AC005624.2", "AC005625.1", "AC005626.3", "AC005631.1",
"AC005668.1", "AC005682.5", "AC005682.6", "AC005682.7", "AC005686.1",
"AC005701.1", "AC005702.1", "AC005702.2", "AC005702.3", "AC005702.4",
"AC005703.2", "AC005703.3", "AC005722.4", "AC005725.1", "AC005730.2",
"AC005740.3", "AC005740.4", "AC005740.5", "AC005740.6", "AC005741.2",
"AC005752.10", "AC005753.1", "AC005754.7", "AC005754.8",
"AC005757.6", "AC005757.7", "AC005758.1", "AC005772.2", "AC005775.2",
"AC005776.1", "AC005777.3", "AC005779.2", "AC005780.1", "AC005783.1",
"AC005785.2", "AC005785.5", "AC005786.3", "AC005786.5", "AC005786.6",
"AC005786.7", "AC005789.9", "AC005794.1", "AC005795.1", "AC005796.2",
"AC005808.3", "AC005822.1", "AC005828.1", "AC005838.2", "AC005863.1",
"AC005863.2", "AC005884.1", "AC005901.1", "AC005915.1", "AC005926.1",
"AC005932.1", "AC005943.6", "AC005944.2", "AC005954.3", "AC005954.4",
"AC006000.5", "AC006003.3", "AC006004.1", "AC006007.1", "AC006011.4",
"AC006014.7", "AC006014.8", "AC006019.1", "AC006019.3", "AC006019.4",
"AC006022.4", "AC006026.1", "AC006026.10", "AC006026.12",
"AC006026.13", "AC006026.9", "AC006028.11", "AC006033.22",
"AC006037.2", "AC006041.1", "AC006042.6", "AC006042.7", "AC006042.8",
"AC006050.2", "AC006070.12", "AC006076.1", "AC006077.3",
"AC006077.4", "AC006088.1", "AC006115.1", "AC006115.6", "AC006116.1",
"AC006116.12", "AC006116.13", "AC006116.14", "AC006116.15",
"AC006116.17", "AC006116.19", "AC006116.20", "AC006116.21",
"AC006116.22", "AC006116.24", "AC006116.27", "AC006126.3",
"AC006126.4", "AC006128.2", "AC006129.1", "AC006129.2", "AC006129.3",
"AC006130.1", "AC006130.3", "AC006130.4", "AC006133.3", "AC006133.7",
"AC006145.1", "AC006145.4", "AC006150.1", "AC006150.2", "AC006153.3",
"AC006156.2", "AC006159.4", "AC006159.5", "AC006160.5", "AC006195.2",
"AC006196.1", "AC006227.1", "AC006262.10", "AC006262.11",
"AC006262.4", "AC006262.5", "AC006272.1", "AC006272.2", "AC006273.4",
"AC006273.5", "AC006277.2", "AC006277.3", "AC006288.1", "AC006296.1",
"AC006296.2", "AC006322.1", "AC006326.3", "AC006326.5", "AC006328.1",
"AC006328.2", "AC006328.3", "AC006328.4", "AC006328.9", "AC006335.10",
"AC006335.11", "AC006335.2", "AC006335.6", "AC006355.3",
"AC006366.3", "AC006369.2", "AC006369.3", "AC006371.1", "AC006372.4",
"AC006372.5", "AC006372.6", "AC006373.1", "AC006377.1", "AC006378.2",
"AC006380.1", "AC006380.3", "AC006386.1", "AC006390.4", "AC006427.2",
"AC006445.1", "AC006445.6", "AC006445.7", "AC006449.2", "AC006452.1",
"AC006452.2", "AC006458.3", "AC006460.2", "AC006461.1", "AC006461.2",
"AC006466.5", "AC006478.1", "AC006480.1", "AC006482.1", "AC006483.1",
"AC006483.5", "AC006486.10", "AC006486.9", "AC006487.1",
"AC006499.1", "AC006499.2", "AC006499.3", "AC006499.4", "AC006499.5",
"AC006499.6", "AC006499.7", "AC006499.9", "AC006509.4", "AC006509.7",
"AC006534.1", "AC006534.2", "AC006534.3", "AC006538.1", "AC006538.4",
"AC006538.8", "AC006539.1", "AC006539.2", "AC006539.3", "AC006539.6",
"AC006547.13", "AC006547.14", "AC006547.15", "AC006547.8",
"AC006548.19", "AC006548.26", "AC006548.28", "AC006552.1",
"AC006557.1", "AC006840.1", "AC006925.1", "AC006926.1", "AC006942.4",
"AC006946.12", "AC006946.15", "AC006946.16", "AC006946.17",
"AC006947.1", "AC006960.5", "AC006960.7", "AC006978.6", "AC006987.4",
"AC006987.5", "AC006987.6", "AC006987.7", "AC006988.1", "AC006989.2",
"AC006994.1", "AC006994.2", "AC006994.3", "AC006995.8", "AC007000.10",
"AC007000.11", "AC007000.12", "AC007003.1", "AC007006.1",
"AC007009.1", "AC007009.2", "AC007016.3", "AC007036.4", "AC007036.5",
"AC007036.6", "AC007038.7", "AC007040.1", "AC007040.11",
"AC007040.2", "AC007040.3", "AC007040.6", "AC007040.8", "AC007041.1",
"AC007041.2", "AC007050.1", "AC007050.17", "AC007050.18",
"AC007056.1", "AC007064.22", "AC007064.24", "AC007064.25",
"AC007078.4", "AC007091.1", "AC007096.1", "AC007098.1", "AC007099.1",
"AC007099.2", "AC007106.1", "AC007115.3", "AC007126.1", "AC007128.1",
"AC007131.1", "AC007131.2", "AC007131.3", "AC007136.1", "AC007161.5",
"AC007163.1", "AC007163.10", "AC007163.11", "AC007163.2",
"AC007163.3", "AC007163.6", "AC007163.8", "AC007163.9", "AC007179.1",
"AC007179.2", "AC007182.6", "AC007191.4", "AC007192.6", "AC007193.10",
"AC007193.6", "AC007193.8", "AC007193.9", "AC007204.2", "AC007204.3",
"AC007216.1", "AC007224.1", "AC007228.11", "AC007228.5",
"AC007228.8", "AC007228.9", "AC007229.3", "AC007237.2", "AC007238.1",
"AC007241.1", "AC007242.1")), dimLabels = c("featureNames",
"featureColumns"), .__classVersion__ = new("Versions", .Data = list(
c(1L, 1L, 0L)))), annotation = character(0), protocolData = new("AnnotatedDataFrame",
varMetadata = structure(list(labelDescription = character(0)), row.names = character(0), class = "data.frame"),
data = structure(list(), .Names = character(0), class = "data.frame", row.names = c("TCGA-N6-A4V9-01A",
"TCGA-QM-A5NM-01A", "TCGA-N8-A4PM-01A", "TCGA-NG-A4VU-01A",
"TCGA-NG-A4VW-01A", "TCGA-N8-A4PN-01A", "TCGA-N5-A4RA-01A",
"TCGA-N6-A4VD-01A", "TCGA-N7-A4Y8-01A", "TCGA-N6-A4VE-01A",
"TCGA-N5-A59F-01A", "TCGA-N9-A4PZ-01A", "TCGA-N6-A4VF-01A",
"TCGA-NF-A5CP-01A", "TCGA-N6-A4VC-01A", "TCGA-N5-A4RF-01A",
"TCGA-N8-A4PL-01A", "TCGA-ND-A4WA-01A", "TCGA-N5-A4RU-01A",
"TCGA-N9-A4Q3-01A", "TCGA-NA-A4R1-01A", "TCGA-N7-A4Y5-01A",
"TCGA-N5-A4RV-01A", "TCGA-QN-A5NN-01A", "TCGA-N9-A4Q1-01A",
"TCGA-N5-A59E-01A", "TCGA-NA-A4QW-01A", "TCGA-N5-A4RM-01A",
"TCGA-NF-A4X2-01A", "TCGA-N5-A4RN-01A", "TCGA-N5-A4RS-01A",
"TCGA-N8-A4PQ-01A", "TCGA-N9-A4Q4-01A", "TCGA-NA-A4QY-01A",
"TCGA-N5-A4RJ-01A", "TCGA-N5-A4RD-01A", "TCGA-NA-A5I1-01A",
"TCGA-NA-A4R0-01A", "TCGA-NA-A4QV-01A", "TCGA-N7-A4Y0-01A",
"TCGA-N5-A4R8-01A", "TCGA-NF-A4WU-01A", "TCGA-N6-A4VG-01A",
"TCGA-N8-A4PI-01A", "TCGA-N8-A4PO-01A", "TCGA-N8-A4PP-01A",
"TCGA-ND-A4WF-01A", "TCGA-NA-A4QX-01A", "TCGA-N9-A4Q7-01A",
"TCGA-N5-A4RO-01A", "TCGA-N5-A4RT-01A", "TCGA-NF-A4WX-01A",
"TCGA-N7-A59B-01A", "TCGA-ND-A4W6-01A", "TCGA-N8-A56S-01A",
"TCGA-ND-A4WC-01A")), dimLabels = c("sampleNames", "sampleColumns"
), .__classVersion__ = new("Versions", .Data = list(c(1L,
1L, 0L)))), .__classVersion__ = new("Versions", .Data = list(
c(4L, 1L, 2L), c(2L, 54L, 0L), c(1L, 3L, 0L), c(1L, 0L, 0L
))))
All suggestions shall be helpful.

Is it possible to extend a line with plotly in R?

Yesterday I asked this question about drawing a line that connects two given points using add_lines() from plotly. That makes me think about some other visualization aspects I want to give to my graph: to connect two given points and extend the line across the whole x-axis.
This is my current database:
dput(sma)
structure(list(time = structure(c(1640808000, 1640822400, 1640836800,
1640851200, 1640865600, 1640880000, 1640894400, 1640908800, 1640923200,
1640937600, 1640952000, 1640966400, 1640980800, 1640995200, 1641009600,
1641024000, 1641038400, 1641052800, 1641067200, 1641081600, 1641096000,
1641110400, 1641124800, 1641139200, 1641153600, 1641168000, 1641182400,
1641196800, 1641211200, 1641225600, 1641240000, 1641254400, 1641268800,
1641283200, 1641297600, 1641312000, 1641326400, 1641340800, 1641355200,
1641369600, 1641384000, 1641398400, 1641412800, 1641427200, 1641441600,
1641456000, 1641470400, 1641484800, 1641499200, 1641513600, 1641528000,
1641542400, 1641556800, 1641571200, 1641585600, 1641600000, 1641614400,
1641628800, 1641643200, 1641657600, 1641672000, 1641686400, 1641700800,
1641715200, 1641729600, 1641744000, 1641758400, 1641772800, 1641787200,
1641801600, 1641816000, 1641830400, 1641844800, 1641859200, 1641873600,
1641888000, 1641902400, 1641916800, 1641931200, 1641945600, 1641960000,
1641974400, 1641988800, 1642003200, 1642017600, 1642032000, 1642046400,
1642060800, 1642075200, 1642089600, 1642104000, 1642118400, 1642132800,
1642147200, 1642161600, 1642176000, 1642190400, 1642204800, 1642219200,
1642233600, 1642248000, 1642262400, 1642276800, 1642291200, 1642305600,
1642320000, 1642334400, 1642348800, 1642363200, 1642377600, 1642392000,
1642406400, 1642420800, 1642435200, 1642449600, 1642464000, 1642478400,
1642492800, 1642507200, 1642521600, 1642536000, 1642550400, 1642564800,
1642579200, 1642593600, 1642608000, 1642622400, 1642636800, 1642651200,
1642665600, 1642680000, 1642694400, 1642708800, 1642723200, 1642737600,
1642752000, 1642766400, 1642780800, 1642795200, 1642809600, 1642824000,
1642838400, 1642852800, 1642867200, 1642881600, 1642896000, 1642910400,
1642924800, 1642939200, 1642953600, 1642968000, 1642982400, 1642996800,
1643011200, 1643025600, 1643040000, 1643054400, 1643068800, 1643083200,
1643097600, 1643112000, 1643126400, 1643140800, 1643155200, 1643169600,
1643184000, 1643198400, 1643212800, 1643227200, 1643241600, 1643256000,
1643270400, 1643284800, 1643299200, 1643313600, 1643328000, 1643342400,
1643356800, 1643371200, 1643385600, 1643400000, 1643414400, 1643428800,
1643443200, 1643457600, 1643472000, 1643486400, 1643500800, 1643515200,
1643529600, 1643544000, 1643558400, 1643572800, 1643587200, 1643601600,
1643616000, 1643630400, 1643644800, 1643659200, 1643673600, 1643688000,
1643702400, 1643716800, 1643731200, 1643745600, 1643760000, 1643774400,
1643788800, 1643803200, 1643817600, 1643832000, 1643846400, 1643860800,
1643875200, 1643889600, 1643904000, 1643918400, 1643932800, 1643947200,
1643961600, 1643976000, 1643990400, 1644004800, 1644019200, 1644033600
), class = c("POSIXct", "POSIXt"), tzone = ""), open = c(0.12428,
0.12167, 0.11791, 0.12133, 0.124, 0.12245, 0.12375, 0.12392,
0.12379, 0.12166, 0.1239, 0.12416, 0.11915, 0.12107, 0.12243,
0.12321, 0.12216, 0.12488, 0.12839, 0.12815, 0.12759, 0.12704,
0.12746, 0.12669, 0.12634, 0.12571, 0.12455, 0.12455, 0.12861,
0.12556, 0.12244, 0.12281, 0.12175, 0.12213, 0.12338, 0.12431,
0.12216, 0.1217, 0.12407, 0.12479, 0.12338, 0.12365, 0.11492,
0.11013, 0.10664, 0.10831, 0.10642, 0.10901, 0.10986, 0.10979,
0.10398, 0.1033, 0.104, 0.10127, 0.10275, 0.10207, 0.10357, 0.10443,
0.10514, 0.10271, 0.09677, 0.10175, 0.10111, 0.10103, 0.10221,
0.10152, 0.10517, 0.10355, 0.10461, 0.10576, 0.10419, 0.09702,
0.09658, 0.09847, 0.10165, 0.10064, 0.0999, 0.10119, 0.10199,
0.10152, 0.10233, 0.10215, 0.10273, 0.1059, 0.10571, 0.10564,
0.10405, 0.10608, 0.10475, 0.10286, 0.10122, 0.10018, 0.10022,
0.10127, 0.09859, 0.10011, 0.10054, 0.10066, 0.10147, 0.10333,
0.10762, 0.11317, 0.11409, 0.11525, 0.11243, 0.11022, 0.10932,
0.11007, 0.10968, 0.11175, 0.11387, 0.11404, 0.11295, 0.10842,
0.10746, 0.10779, 0.11022, 0.11553, 0.11481, 0.11341, 0.1146,
0.11565, 0.11529, 0.11192, 0.11229, 0.11194, 0.11081, 0.10661,
0.10554, 0.10666, 0.10636, 0.10864, 0.10741, 0.09956, 0.09362,
0.09521, 0.09495, 0.0936, 0.09223, 0.08409, 0.0828, 0.07273,
0.07066, 0.07008, 0.0701, 0.072, 0.0711, 0.07424, 0.07467, 0.07324,
0.07124, 0.07559, 0.07096, 0.06866, 0.06469, 0.06602, 0.06853,
0.07014, 0.06903, 0.06895, 0.07152, 0.0715, 0.07204, 0.07213,
0.07263, 0.07346, 0.07471, 0.07629, 0.0757, 0.07368, 0.07013,
0.07135, 0.07329, 0.07601, 0.07396, 0.07423, 0.07524, 0.074,
0.0731, 0.0754, 0.07527, 0.07648, 0.07666, 0.07782, 0.07804,
0.07598, 0.07785, 0.07924, 0.07924, 0.0803, 0.07938, 0.07773,
0.07475, 0.07529, 0.07172, 0.07102, 0.07118, 0.07292, 0.07386,
0.07367, 0.07504, 0.07506, 0.07524, 0.0764, 0.07571, 0.07642,
0.07676, 0.07632, 0.0777, 0.07355, 0.07462, 0.07218, 0.07176,
0.07262, 0.07203, 0.07313, 0.0723, 0.07433, 0.075, 0.07626, 0.07713,
0.07766, 0.07823, 0.07916, 0.08149), high = c(0.1249, 0.1219,
0.1221, 0.12449, 0.12468, 0.12469, 0.125, 0.12459, 0.12419, 0.12509,
0.1247, 0.12435, 0.12219, 0.12314, 0.12337, 0.12379, 0.1257,
0.13202, 0.12864, 0.12884, 0.12778, 0.12824, 0.1275, 0.12846,
0.12643, 0.12586, 0.12611, 0.1293, 0.1291, 0.12598, 0.12539,
0.12323, 0.12241, 0.1235, 0.1258, 0.12597, 0.1243, 0.12522, 0.12494,
0.12527, 0.1252, 0.12372, 0.11609, 0.11294, 0.10881, 0.10838,
0.11043, 0.11073, 0.1107, 0.11156, 0.1046, 0.10593, 0.10532,
0.10439, 0.10434, 0.10447, 0.10498, 0.10556, 0.10518, 0.1035,
0.10294, 0.10226, 0.10237, 0.10302, 0.10435, 0.10577, 0.10697,
0.10637, 0.10794, 0.10592, 0.10451, 0.10002, 0.09904, 0.10209,
0.10208, 0.10162, 0.10222, 0.10529, 0.10228, 0.10552, 0.10301,
0.10383, 0.10751, 0.10666, 0.10712, 0.10641, 0.10727, 0.10798,
0.10733, 0.10371, 0.10179, 0.10146, 0.10257, 0.10128, 0.10085,
0.10155, 0.10168, 0.10219, 0.1042, 0.1084, 0.11577, 0.115, 0.11817,
0.116, 0.1129, 0.11084, 0.11083, 0.1113, 0.11353, 0.11784, 0.11776,
0.11845, 0.11295, 0.10911, 0.10845, 0.11478, 0.11579, 0.1175,
0.11665, 0.11785, 0.11698, 0.1194, 0.11767, 0.11323, 0.11335,
0.11267, 0.11098, 0.10751, 0.10698, 0.10684, 0.10928, 0.1089,
0.10764, 0.10056, 0.09559, 0.09648, 0.09531, 0.0943, 0.09277,
0.08542, 0.08315, 0.07432, 0.07523, 0.07335, 0.07358, 0.07323,
0.07433, 0.07611, 0.07517, 0.07387, 0.07573, 0.07559, 0.0712,
0.0701, 0.0662, 0.06954, 0.07125, 0.07021, 0.06932, 0.07309,
0.073, 0.0732, 0.07273, 0.07317, 0.074, 0.07531, 0.07681, 0.07934,
0.0757, 0.07448, 0.07179, 0.07405, 0.07721, 0.0763, 0.07491,
0.07546, 0.07561, 0.07502, 0.07573, 0.07638, 0.0769, 0.07732,
0.078, 0.07849, 0.07858, 0.07817, 0.07933, 0.08047, 0.08092,
0.0805, 0.07974, 0.07813, 0.0763, 0.07558, 0.07249, 0.07182,
0.07319, 0.0752, 0.07437, 0.07518, 0.07607, 0.07724, 0.07668,
0.07748, 0.07744, 0.07743, 0.07725, 0.07776, 0.07836, 0.07492,
0.07462, 0.07259, 0.07278, 0.07301, 0.07326, 0.0739, 0.07444,
0.07535, 0.07669, 0.07729, 0.07824, 0.07928, 0.07934, 0.08162,
0.08316), low = c(0.11978, 0.1178, 0.1172, 0.1201, 0.12178, 0.12205,
0.12212, 0.12193, 0.12048, 0.12058, 0.12257, 0.11896, 0.11811,
0.12107, 0.12117, 0.12129, 0.122, 0.12429, 0.1266, 0.12721, 0.1266,
0.12661, 0.12412, 0.12504, 0.12548, 0.12404, 0.1243, 0.12431,
0.12533, 0.12138, 0.12, 0.12036, 0.12059, 0.12162, 0.12222, 0.1203,
0.12148, 0.12103, 0.12313, 0.12225, 0.12175, 0.11411, 0.10467,
0.10653, 0.10525, 0.10507, 0.10529, 0.10833, 0.10878, 0.10316,
0.10021, 0.10294, 0.09925, 0.10017, 0.1003, 0.10126, 0.10326,
0.10373, 0.10133, 0.09563, 0.09632, 0.09935, 0.10089, 0.09973,
0.10072, 0.10144, 0.10297, 0.10316, 0.10421, 0.10231, 0.09465,
0.09572, 0.09618, 0.09773, 0.09974, 0.09863, 0.09931, 0.10089,
0.10076, 0.10128, 0.10143, 0.10196, 0.10253, 0.10498, 0.1053,
0.10303, 0.10376, 0.10452, 0.10154, 0.10024, 0.0996, 0.09903,
0.1002, 0.09738, 0.09778, 0.09941, 0.1003, 0.10007, 0.10095,
0.1027, 0.10753, 0.11202, 0.11312, 0.1108, 0.1097, 0.10787, 0.10805,
0.10945, 0.10915, 0.10955, 0.11154, 0.11255, 0.10815, 0.10594,
0.10556, 0.10715, 0.10988, 0.11185, 0.11061, 0.11198, 0.11243,
0.11368, 0.11125, 0.10968, 0.11047, 0.11069, 0.10627, 0.10495,
0.10497, 0.10559, 0.10482, 0.10695, 0.099, 0.09241, 0.09346,
0.09452, 0.08974, 0.09206, 0.08209, 0.08185, 0.07179, 0.06451,
0.06982, 0.06912, 0.06969, 0.06978, 0.07074, 0.07367, 0.07129,
0.07085, 0.071, 0.07051, 0.06847, 0.06405, 0.06267, 0.0644, 0.06819,
0.06828, 0.06762, 0.06881, 0.07029, 0.07149, 0.07066, 0.07069,
0.07232, 0.07344, 0.07382, 0.07435, 0.07163, 0.0697, 0.0698,
0.07053, 0.07294, 0.07338, 0.07073, 0.07214, 0.07394, 0.07241,
0.07208, 0.07436, 0.0751, 0.0757, 0.07623, 0.07703, 0.07535,
0.07524, 0.0776, 0.07782, 0.07924, 0.0789, 0.07693, 0.07389,
0.07411, 0.07132, 0.07025, 0.07026, 0.07008, 0.07264, 0.07324,
0.07341, 0.07425, 0.07435, 0.07507, 0.07561, 0.07569, 0.07585,
0.07574, 0.07585, 0.07335, 0.0722, 0.07157, 0.071, 0.0716, 0.07029,
0.07111, 0.07195, 0.07201, 0.07392, 0.07465, 0.07623, 0.07472,
0.0775, 0.07763, 0.07878, 0.08125), close = c(0.12167, 0.11791,
0.12137, 0.124, 0.12236, 0.12377, 0.12392, 0.12381, 0.12164,
0.12389, 0.12415, 0.11915, 0.12109, 0.1224, 0.1232, 0.12214,
0.12488, 0.12839, 0.1281, 0.12755, 0.12701, 0.12745, 0.12667,
0.12633, 0.12575, 0.12454, 0.12458, 0.12859, 0.12555, 0.1224,
0.12279, 0.12176, 0.12208, 0.12335, 0.12427, 0.12214, 0.1217,
0.12403, 0.12473, 0.12335, 0.1237, 0.11486, 0.11016, 0.10653,
0.10829, 0.10642, 0.10902, 0.10982, 0.10981, 0.10402, 0.10336,
0.104, 0.10134, 0.10268, 0.10199, 0.10358, 0.10443, 0.10513,
0.10274, 0.09678, 0.10175, 0.10115, 0.10107, 0.1022, 0.10152,
0.10517, 0.10362, 0.10465, 0.10576, 0.10422, 0.09695, 0.09657,
0.09841, 0.10165, 0.10065, 0.09993, 0.10115, 0.10199, 0.10155,
0.10233, 0.10212, 0.10274, 0.10594, 0.10571, 0.10572, 0.10405,
0.10609, 0.10478, 0.10286, 0.10132, 0.10018, 0.10025, 0.10122,
0.09857, 0.10011, 0.10051, 0.10072, 0.10155, 0.10333, 0.10762,
0.11307, 0.11414, 0.11527, 0.11241, 0.11021, 0.1093, 0.11005,
0.10972, 0.11176, 0.11385, 0.11405, 0.1129, 0.10851, 0.10746,
0.10777, 0.11022, 0.11558, 0.11485, 0.11349, 0.11465, 0.11569,
0.11527, 0.1119, 0.11233, 0.11197, 0.11084, 0.10661, 0.10556,
0.10664, 0.1064, 0.10863, 0.10743, 0.09959, 0.09358, 0.09525,
0.09484, 0.09361, 0.09215, 0.08424, 0.08281, 0.0727, 0.0706,
0.07001, 0.07005, 0.07199, 0.07117, 0.07421, 0.07469, 0.07327,
0.07132, 0.07559, 0.07097, 0.06862, 0.0647, 0.066, 0.06857, 0.07012,
0.06901, 0.06896, 0.0715, 0.07156, 0.07209, 0.07207, 0.07261,
0.07345, 0.07469, 0.07625, 0.0758, 0.07376, 0.07006, 0.07137,
0.07336, 0.07602, 0.07389, 0.07429, 0.0752, 0.07399, 0.07305,
0.07533, 0.07525, 0.0765, 0.07666, 0.07782, 0.07804, 0.07596,
0.07783, 0.07925, 0.07921, 0.08028, 0.07938, 0.0779, 0.07477,
0.07534, 0.07174, 0.07103, 0.07122, 0.07289, 0.07387, 0.07369,
0.07503, 0.07509, 0.07524, 0.07636, 0.07573, 0.07639, 0.07679,
0.07628, 0.0777, 0.07359, 0.07462, 0.07216, 0.07173, 0.07265,
0.07201, 0.07315, 0.07227, 0.07429, 0.07499, 0.07626, 0.07713,
0.07766, 0.07819, 0.07915, 0.08148, 0.08275), volume = c(17894295,
25956559, 19646834, 21073444, 18817421, 12316289, 11348380, 14945318,
20611382, 29389056, 15639183, 23990903, 10230550, 11791876, 8849962,
8712513, 17411436, 52294930, 13741243, 12159456, 10156693, 7392933,
24556017, 12498171, 6585602, 9053311, 10389994, 32763165, 18691599,
20920341, 17194082, 13384844, 10762647, 11238837, 20643490, 17826487,
8605881, 12725146, 8033532, 14576577, 18203767, 33106274, 57475480,
35090353, 19236551, 22848525, 19670114, 12209910, 9189784, 28139942,
32849205, 23256020, 31210609, 23094329, 12240627, 12774399, 8347728,
10614794, 13157648, 47509634, 20708007, 13009872, 5347605, 10099313,
18566517, 24284140, 16257416, 13504669, 26353561, 13722621, 42173001,
23675661, 8144656, 17929342, 9387011, 13854189, 14603858, 31616737,
6704224, 24196867, 13695017, 11613987, 27856536, 13454585, 10497017,
16458068, 16297639, 12785798, 19360445, 12732714, 10444114, 16201247,
9645137, 19007416, 14556473, 9980469, 8106055, 13820499, 10194965,
64253247, 161980227, 55008265, 62794334, 47634737, 27375292,
28948205, 23303586, 15667935, 20378324, 42039932, 45234586, 55979026,
38458874, 19968558, 11843244, 33406862, 42373158, 54126294, 46806385,
61654732, 27197944, 59155494, 33707242, 23832047, 19967177, 10957640,
15637922, 19658790, 13028772, 9082828, 24976755, 10789730, 39076951,
49842677, 16384967, 15601195, 29659625, 14836814, 53131858, 26904846,
50215911, 80446251, 31711637, 27684325, 18295756, 30244578, 25000228,
31701319, 20297596, 17620148, 16712144, 24532847, 20024178, 61355138,
49383309, 34613954, 15938600, 14048986, 9165050, 33670464, 28771619,
24220858, 11889148, 24206767, 16696844, 19341205, 30682562, 48411541,
31624605, 19583695, 7736058, 14697691, 20371228, 21601985, 14667855,
11662673, 8565838, 8950674, 15198713, 18115403, 13873815, 9454750,
13116891, 11227183, 17723342, 11168569, 17650051, 16902150, 16042595,
12631966, 17581570, 22259046, 16421002, 23295568, 15918092, 18004724,
24079621, 23097753, 12800081, 12312440, 13131810, 19374725, 14036774,
15552921, 12017393, 6465640, 6071254, 8288237, 23909383, 15594514,
13318570, 9361610, 7166725, 9715764, 8906698, 8078021, 8742947,
5312715, 8228518, 7468992, 21681712, 15425063, 9088154, 16051149,
14306452), trades = c(11591L, 13904L, 8770L, 8976L, 8889L, 7218L,
7956L, 10289L, 8338L, 15267L, 7974L, 11350L, 6627L, 8199L, 5462L,
5711L, 9750L, 27559L, 7345L, 7275L, 4761L, 4086L, 11405L, 7343L,
3511L, 5410L, 4619L, 14885L, 10363L, 11337L, 10040L, 7900L, 6029L,
6823L, 9894L, 9795L, 5252L, 8359L, 4739L, 8325L, 10895L, 17994L,
26704L, 16954L, 11073L, 11451L, 10072L, 6270L, 4694L, 13397L,
14960L, 9414L, 14906L, 12126L, 6198L, 5929L, 4447L, 4968L, 6663L,
19502L, 8574L, 6111L, 2793L, 4580L, 7616L, 11026L, 7975L, 6380L,
10178L, 7006L, 18590L, 11151L, 4108L, 7542L, 4110L, 7336L, 7791L,
14672L, 3764L, 12346L, 6006L, 6644L, 14171L, 6804L, 5282L, 7091L,
6975L, 7109L, 9196L, 7046L, 5131L, 7664L, 5566L, 9995L, 8029L,
4665L, 3391L, 5387L, 5661L, 21898L, 63727L, 23335L, 25023L, 22152L,
11598L, 12217L, 10815L, 6903L, 10246L, 25837L, 21694L, 21720L,
12474L, 8370L, 5376L, 15747L, 18057L, 20906L, 17232L, 25948L,
11954L, 24800L, 12686L, 9503L, 8451L, 6271L, 8233L, 10329L, 6095L,
5637L, 9733L, 6092L, 13746L, 19684L, 7050L, 6934L, 13457L, 7401L,
17572L, 11348L, 18615L, 25756L, 10412L, 10349L, 6128L, 12691L,
9583L, 10143L, 7123L, 7471L, 6147L, 10867L, 6986L, 14811L, 15151L,
9144L, 4273L, 4538L, 3426L, 9159L, 9095L, 8463L, 4558L, 7123L,
6183L, 6101L, 8886L, 16735L, 8368L, 6808L, 3165L, 5547L, 8119L,
9066L, 6105L, 5640L, 4008L, 4116L, 4971L, 6974L, 4911L, 3472L,
4044L, 4096L, 5997L, 4972L, 7099L, 7793L, 6059L, 4567L, 5282L,
6897L, 6491L, 10157L, 6830L, 6899L, 8623L, 9719L, 4053L, 4742L,
4628L, 7551L, 5978L, 7164L, 4851L, 3556L, 3060L, 3858L, 8498L,
6731L, 5812L, 3765L, 2530L, 3805L, 3734L, 4060L, 3785L, 2778L,
4578L, 4151L, 8128L, 7304L, 3698L, 7376L, 5582L), SMA_5 = c(NA,
NA, NA, NA, 0.121462, 0.121882, 0.123084, 0.123572, 0.1231, 0.123406,
0.123482, 0.122528, 0.121984, 0.122136, 0.121998, 0.121596, 0.122742,
0.124202, 0.125342, 0.126212, 0.127186, 0.1277, 0.127356, 0.127002,
0.126642, 0.126148, 0.125574, 0.125958, 0.125802, 0.125132, 0.124782,
0.124218, 0.122916, 0.122476, 0.12285, 0.12272, 0.122708, 0.123098,
0.123374, 0.12319, 0.123502, 0.122134, 0.11936, 0.11572, 0.112708,
0.109252, 0.108084, 0.108016, 0.108672, 0.107818, 0.107206, 0.106202,
0.104506, 0.10308, 0.102674, 0.102718, 0.102804, 0.103562, 0.103574,
0.102532, 0.102166, 0.10151, 0.100698, 0.10059, 0.101538, 0.102222,
0.102716, 0.103432, 0.104144, 0.104684, 0.10304, 0.10163, 0.100382,
0.09956, 0.098846, 0.099442, 0.100358, 0.101074, 0.101054, 0.10139,
0.101828, 0.102146, 0.102936, 0.103768, 0.104446, 0.104832, 0.105502,
0.10527, 0.1047, 0.10382, 0.103046, 0.101878, 0.101166, 0.100308,
0.100066, 0.100132, 0.100226, 0.100292, 0.101244, 0.102746, 0.105258,
0.107942, 0.110686, 0.112502, 0.11302, 0.112266, 0.111448, 0.110338,
0.110208, 0.110936, 0.111886, 0.112456, 0.112214, 0.111354, 0.110138,
0.109372, 0.109908, 0.111176, 0.112382, 0.113758, 0.114852, 0.11479,
0.1142, 0.113968, 0.113432, 0.112462, 0.11073, 0.109462, 0.108324,
0.10721, 0.106768, 0.106932, 0.105738, 0.103126, 0.100896, 0.098138,
0.095374, 0.093886, 0.092018, 0.08953, 0.085102, 0.0805, 0.076072,
0.073234, 0.07107, 0.070764, 0.071486, 0.072422, 0.073066, 0.072932,
0.073816, 0.073168, 0.071954, 0.07024, 0.069176, 0.067772, 0.067602,
0.06768, 0.068532, 0.069632, 0.07023, 0.070624, 0.071236, 0.071966,
0.072356, 0.072982, 0.073814, 0.07456, 0.07479, 0.074112, 0.073448,
0.07287, 0.072914, 0.07294, 0.073786, 0.074552, 0.074678, 0.074084,
0.074372, 0.074564, 0.074824, 0.075358, 0.076312, 0.076854, 0.076996,
0.077262, 0.07778, 0.078058, 0.078506, 0.07919, 0.079204, 0.078308,
0.077534, 0.075826, 0.074156, 0.07282, 0.072444, 0.07215, 0.07254,
0.07334, 0.074114, 0.074584, 0.075082, 0.07549, 0.075762, 0.076102,
0.07631, 0.076578, 0.07615, 0.075796, 0.07487, 0.07396, 0.07295,
0.072634, 0.07234, 0.072362, 0.072874, 0.073342, 0.074192, 0.074988,
0.076066, 0.076846, 0.077678, 0.078722, 0.079846), SMA_10 = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, 0.122434, 0.122682, 0.122806,
0.122778, 0.122618, 0.122702, 0.122539, 0.122635, 0.123093, 0.123739,
0.124105, 0.124391, 0.125221, 0.125779, 0.126172, 0.126427, 0.126667,
0.126637, 0.126657, 0.126402, 0.125887, 0.125465, 0.124896, 0.124437,
0.124139, 0.123991, 0.123751, 0.123463, 0.123007, 0.122925, 0.12302,
0.123111, 0.122421, 0.121229, 0.119547, 0.117949, 0.116377, 0.115109,
0.113688, 0.112196, 0.110263, 0.108229, 0.107143, 0.106261, 0.105876,
0.105246, 0.104962, 0.104503, 0.104034, 0.103327, 0.102603, 0.102442,
0.102157, 0.10213, 0.102082, 0.102035, 0.102194, 0.102113, 0.102065,
0.102367, 0.103111, 0.102631, 0.102173, 0.101907, 0.101852, 0.101765,
0.101241, 0.100994, 0.100728, 0.100307, 0.100118, 0.100635, 0.101252,
0.102005, 0.102411, 0.102918, 0.10333, 0.103824, 0.104103, 0.104234,
0.104133, 0.103939, 0.10369, 0.103218, 0.102504, 0.101943, 0.101589,
0.101052, 0.100729, 0.100776, 0.101406, 0.102695, 0.104084, 0.105489,
0.106873, 0.107883, 0.108762, 0.109695, 0.110512, 0.111355, 0.111978,
0.112076, 0.111952, 0.111276, 0.110781, 0.110537, 0.110629, 0.111182,
0.111695, 0.111868, 0.111948, 0.112112, 0.112349, 0.112688, 0.113175,
0.113595, 0.113657, 0.11276, 0.111831, 0.111146, 0.110321, 0.109615,
0.108831, 0.1076, 0.105725, 0.104053, 0.102453, 0.101153, 0.099812,
0.097572, 0.095213, 0.09162, 0.087937, 0.084979, 0.082626, 0.0803,
0.077933, 0.075993, 0.074247, 0.07315, 0.072001, 0.07229, 0.072327,
0.072188, 0.071653, 0.071054, 0.070794, 0.070385, 0.069817, 0.069386,
0.069404, 0.069001, 0.069113, 0.069458, 0.070249, 0.070994, 0.071606,
0.072219, 0.072898, 0.073378, 0.073234, 0.073215, 0.073342, 0.073737,
0.073865, 0.073949, 0.074, 0.073774, 0.073499, 0.073656, 0.074175,
0.074688, 0.075018, 0.075198, 0.075613, 0.07578, 0.076043, 0.076569,
0.077185, 0.07768, 0.078093, 0.078233, 0.078044, 0.077796, 0.077166,
0.076673, 0.076012, 0.075376, 0.074842, 0.074183, 0.073748, 0.073467,
0.073514, 0.073616, 0.074015, 0.074551, 0.075108, 0.075447, 0.07583,
0.07582, 0.075779, 0.075486, 0.075135, 0.074764, 0.074392, 0.074068,
0.073616, 0.073417, 0.073146, 0.073413, 0.073664, 0.074214, 0.07486,
0.07551, 0.076457, 0.077417), SMA_20 = c(NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.1232695,
0.1235365, 0.1240135, 0.1242785, 0.124395, 0.1245645, 0.124603,
0.124636, 0.124875, 0.1250705, 0.124996, 0.124928, 0.1250585,
0.125108, 0.1251555, 0.125209, 0.125209, 0.12505, 0.124832, 0.1246635,
0.1244535, 0.124288, 0.1236585, 0.122833, 0.121843, 0.12097,
0.120064, 0.119286, 0.1183475, 0.1175605, 0.1166415, 0.11567,
0.114782, 0.113745, 0.1127115, 0.1115975, 0.1106695, 0.109806,
0.108861, 0.1077615, 0.106433, 0.1053355, 0.10465, 0.1041955,
0.103979, 0.1036405, 0.103578, 0.103308, 0.1030495, 0.102847,
0.102857, 0.1025365, 0.102165, 0.1020185, 0.101967, 0.1019, 0.1017175,
0.1015535, 0.1013965, 0.101337, 0.1016145, 0.101633, 0.1017125,
0.101956, 0.1021315, 0.1023415, 0.1022855, 0.102409, 0.1024155,
0.1022705, 0.1021255, 0.102287, 0.102471, 0.1026115, 0.1024575,
0.1024305, 0.1024595, 0.102438, 0.102416, 0.102505, 0.1027695,
0.103317, 0.103887, 0.1043535, 0.1046885, 0.104913, 0.1051755,
0.1053735, 0.1056205, 0.1060655, 0.106692, 0.1073855, 0.108018,
0.1083825, 0.108827, 0.10921, 0.1096955, 0.1104385, 0.1111035,
0.1116115, 0.111963, 0.112094, 0.1121505, 0.111982, 0.111978,
0.112066, 0.112143, 0.111971, 0.111763, 0.111507, 0.1111345,
0.1108635, 0.11059, 0.110144, 0.10945, 0.108824, 0.108055, 0.1069565,
0.1058215, 0.104359, 0.102767, 0.1006175, 0.0983839999999999,
0.0962894999999999, 0.0941754999999999, 0.0921764999999999, 0.0901929999999999,
0.0885729999999999, 0.0870294999999999, 0.0853609999999999, 0.0836069999999999,
0.0819549999999999, 0.0801319999999999, 0.0785834999999999, 0.0771394999999999,
0.0756769999999999, 0.0743634999999999, 0.0731889999999999, 0.0720319999999999,
0.0712679999999999, 0.0707024999999999, 0.0706454999999999, 0.0707199999999999,
0.0708229999999999, 0.0709509999999999, 0.0710239999999999, 0.0711999999999999,
0.0713019999999999, 0.0713574999999999, 0.0713819999999999, 0.0713189999999999,
0.0711079999999999, 0.0712274999999999, 0.0715974999999999, 0.0720569999999999,
0.0724714999999999, 0.0728029999999999, 0.0729964999999999, 0.0731984999999999,
0.0735169999999999, 0.0737044999999999, 0.0739514999999999, 0.0741799999999999,
0.0744674999999999, 0.0747389999999999, 0.0748644999999999, 0.0750214999999999,
0.0751714999999999, 0.0753419999999999, 0.0756679999999999, 0.0761339999999999,
0.0764604999999999, 0.0765309999999999, 0.0764969999999999, 0.0763894999999999,
0.0762264999999999, 0.0760274999999999, 0.0759724999999999, 0.0760134999999999,
0.0759314999999999, 0.0759204999999999, 0.0758499999999999, 0.0757789999999999,
0.0757059999999999, 0.0755904999999999, 0.0756119999999999, 0.0755599999999999,
0.0754114999999999, 0.0753359999999999, 0.0750014999999999, 0.0747634999999999,
0.0744764999999999, 0.0743244999999999, 0.0741899999999999, 0.0742034999999999,
0.0743094999999999, 0.0743619999999999, 0.0744319999999999, 0.0744879999999999,
0.0746164999999999, 0.0747214999999999, 0.0748499999999999, 0.0749974999999999,
0.0751369999999999, 0.0754244999999999, 0.0757424999999999)), row.names = c(NA,
-225L), class = c("data.table", "data.frame"), .internal.selfref = <pointer: 0x00000000105f1ef0>)
What I want is to connect the two highest highs and expand the line across all the x-axis. Here's the code to get that data:
highs <- arrange(sma, desc(high))%>%
slice(1:2)
highs
time open high low close volume trades SMA_5 SMA_10 SMA_20
1: 2022-01-01 10:00:00 0.12488 0.13202 0.12429 0.12839 52294930 27559 0.124202 0.123093 NA
2: 2022-01-03 02:00:00 0.12455 0.12930 0.12431 0.12859 32763165 14885 0.125958 0.126657 0.124875
So basically I have 0.13202 from January 1st and 0.12930 from January 3rd as my highest highs. With some code such as:
add_lines(inherit = F, data = highs, x = ~time, y = ~high,
name = "Higher highs trendline", line = list(color = "seagreen", width = 2.5, dash = "dot"))
I can draw the line exactly for the two points in my highs object. But what I want is that this line goes across all my graph. In short, given two points I want to draw a trendline the same way we used to do on basic algebra. Main code for my graph is:
sma %>% plot_ly(x = ~time, type="candlestick",
open = ~open, close = ~close,
high = ~high, low = ~low) %>%
add_lines(x = ~time, y= ~SMA_5, line = list(color = "gold", width = 2), inherit = F,
name = "SMA 5", showlegend=T)%>%
add_lines(x = ~time, y= ~SMA_10, line = list(color = "deeppink", width = 2), inherit = F,
name = "SMA 10", showlegend=T)%>%
add_lines(x = ~time, y= ~SMA_20, line = list(color = "purple", width = 2), inherit = F,
name = "SMA 20", showlegend=T)%>%
plotly::layout(title = paste0(nombre, " Simple Moving Average, ", tiempo),
xaxis= list(title="Time", rangeslider = list(visible = F)), yaxis = list(title = "Price"),
sliders=list(visible=F)) -> sma_
Any help and orientation will be much appreciated.
You could fit a linear model on the two high points, and predict it's values on the remaining dataset:
fit <- lm(high ~ time, data = highs)
sma %>% plot_ly(x = ~time, type="candlestick",
open = ~open, close = ~close,
high = ~high, low = ~low) %>%
add_lines( x = ~time, y = ~predict(fit,sma))

How to use " ind.sup" on a MCA analysis?

I cant run my MCa with a ind.sup, I dont know why. Here's my code :
library(FactoMineR)
data_ACM <- data[80000:81000,]
res.AMC <- MCA(data_ACM, ncp = 6, graph = F, ind.sup = 700)
Error in eigen(crossprod(t(X), t(X)), symmetric = TRUE) :
infinite or missing values in 'x'
dpu(data[1:10,]) returns this :
"SOHDZET", "SOHDZF", "SOHDZFT", "SOKFXD", "SOKFXF", "SOM31BL4B1D",
"SONFZD", "SONFZF", "SOVJZC", "SOVJZE", "SOVJZET", "SOVJZF",
"SOVJZFT", "SOVJZJ", "SOZAAZ", "SP01", "SP21", "SP308", "SP41",
"SP4DWC", "SP61", "SP81", "SR11", "SR1F0H", "SR1G0H", "SR1H06",
"SR1J0H", "SR1J22", "SR1J32", "SR1L22", "SR1L32", "SR1M22",
"SR270E", "SR31", "SR4DWC", "SR51", "SR81", "SR8J32", "SR8L32",
"SREU0H", "SRH1ELC", "SRH1ELCD", "SS11", "SS31", "SS51",
"SS55", "SS71", "SS91", "ST12", "ST72", "ST785E", "STA",
"STADRX01AG", "STADRX01SG", "STAFNX01AG", "STAFNX01SG", "STAGZX01SG",
"STAHLX01AG", "STAHLX01SG", "STAHUX01AG", "STAHUX01SG", "STAV",
"STB", "STBV", "STC", "STCDCA", "STCV", "SU31", "SU35", "SU55",
"SU55A", "SV10", "SV10EM", "SV1V12", "SV31", "SVA", "SVAV",
"SW11", "SW31", "SW51", "SW52X400", "SW52X700", "SW53K2",
"SW53K200", "SW53K9", "SW53K900", "SW5441", "SW5449", "SW58K2",
"SW58K200", "SW58K3", "SW58K7", "SW58K9", "SW58K900", "SW5952",
"SW5953", "SW5957", "SW5959", "SW59G200", "SW59G300", "SW59G700",
"SW59G900", "SW6142", "SW6149", "SW61P2", "SW61P200", "SW61P9",
"SW61P900", "SW61S200", "SW61S900", "SW6542", "SW6549", "SW65P2",
"SW65P200", "SW65P9", "SW65P900", "SW65S200", "SW65S900",
"SW6942", "SW71", "SW7140", "SW7141", "SW7144", "SW7146",
"SW7362", "SW743200", "SW743900", "SW7462", "SW7469", "SW793200",
"SW793700", "SW793900", "SW7962", "SW7964", "SW7967", "SW7969",
"SW8042", "SW8142", "SX11", "SX31", "SX71", "SXBHW6", "SXBHY6",
"SXHMP6", "SXHMZ6", "SXHNZ6", "SXHNZT", "SY11", "SY31", "SY33",
"SY34", "SY53", "SY54", "SY71", "SYN1E", "SZ58K3", "SZ58K7",
"SZ5953", "SZ5957", "SZ59G300", "SZ59G700", "SZ7144", "SZ7146",
"SZ793700", "SZ7964", "SZ7967", "SZ799400", "T11", "T12",
"T1X000", "T1X004", "T1X300", "T1X305", "T1X805", "T1XE05",
"T1XF05", "T27WWT270", "T27WWT271", "T27ZRT270", "T27ZRT271",
"T2DG1", "T2DH1", "T2DH2", "T2DJ1", "T2DJ2", "T2W300", "T2W305",
"T2W800", "T2W805", "T2WE05", "T2WF05", "T31DD03", "T31EE01",
"T32AA", "T32AA01", "T32AA02", "T32AA03", "T32AA04", "T32BB",
"T32BB01", "T32BB02", "T32BB05", "T32BB06", "T32CC", "T32CC01",
"T32CC02", "T32CC03", "T32CC04", "T32DD", "T32EE", "T3408",
"T3419", "T3435", "T3448", "T3467", "T3DB1", "T3DE1", "T3DE2",
"T3LA1", "T3LA2", "T3X000", "T3X100", "T3X300", "T3X305",
"T3X800", "T3X805", "T3XE05", "T3XF05", "T4BBD", "T4BBG",
"T4BCD", "T4BCE", "T4BCF", "T4DCA", "T4DCD", "T4DCT", "T4DCX",
"T4DCY", "T4X000", "T4X100", "T4X305", "T4X405", "T4X800",
"T4X805", "T4XE05", "T4XF05", "T4XG05", "T5408", "T5419",
"T5435", "T5448", "T5808", "T5819", "T5835", "T5848", "T5X000",
"T5X200", "T5X205", "T5X300", "T5X305", "T5X405", "T5X800",
"T5X805", "T5XF05", "T5XG05", "T6EB1", "T6EB4", "T6EB6",
"T6EB7", "T6ED5", "T6EE2", "T6MB1", "T6MB6", "T6MB7", "T6MC1",
"T6MD5", "T72", "T7JA1", "T7W200", "T7W205", "T7W300", "T7W405",
"T7WG05", "T824833", "T82W433", "T82W434", "T8344", "T8358A",
"T8378A", "T8380", "T8390A", "T8394", "T83T4", "T844433",
"T844434", "T844533", "T844544", "T845034", "T845043", "T845044",
"T8458", "T847433", "T847443", "T847833", "T8478A", "T8480",
"T8488", "T849033", "T849043", "T8490A", "T8494", "T8494B43",
"T8494B44", "T84T4", "T84T443", "T84T444", "T84T543", "T84T544",
"T84T833", "T84T843", "T855", "T857", "T85T4", "T85T8", "T9408",
"T9419", "T9435", "T9448", "T9508", "T9519", "T9535", "T9548",
"T9808", "T9819", "T9835", "T9848", "T9PG2", "TA", "TA12",
"TA12F2", "TA12J5", "TA12L2", "TA12L5", "TA13008", "TA13035",
"TA13068", "TA1308", "TA1335", "TA1368", "TA14", "TA16008",
"TA16035", "TA16068", "TA1608", "TA1635", "TA1668", "TA2",
"TA22", "TA23H", "TA23MB", "TA23MQG", "TA2422", "TA2422A",
"TA28MB", "TA32408", "TA32419", "TA32468", "TA40", "TA40AKS",
"TA40AMS", "TA43035", "TA43068", "TA4308", "TA4319", "TA4335",
"TA4368", "TA4408", "TA4419", "TA4435", "TA4468", "TA60AMS",
"TA60BLMB", "TA72L2", "TA72L5", "TA8408", "TA8419", "TA8435",
"TA8468", "TA9408", "TA9419", "TA9435", "TA9468", "TA94E08",
"TA94E19", "TA94E35", "TA94E68", "TAA408", "TAA419", "TAA435",
"TAA468", "TAA8408", "TAA9408", "TAA94E08", "TAAA408", "TAAP11",
"TAAW10", "TABCAS", "TABCDS", "TAC408", "TAC419", "TAC468",
"TAD308", "TAD3G08", "TAF408", "TAF419", "TAF435", "TAF468",
"TAJ3G008", "TAJ3G08", "TAK1367", "TAK4367", "TAKD467", "TAKU467",
"TAKV467", "TAM3019", "TAM3035", "TAM3068", "TAM319", "TAM335",
"TAM368", "TAM6019", "TAM6035", "TAM6068", "TAM619", "TAM635",
"TAM668", "TAN308", "TAN419", "TAN435", "TAN468", "TAN619",
"TAN635", "TAN668", "TANT30", "TAS335", "TAS3G08", "TATB",
"TATF", "TATHA", "TATHB", "TATJA", "TATJB", "TAU8470", "TAUA470",
"TAW4035", "TAW4068", "TAW6035", "TAW6068", "TAX100", "TAX300",
"TAZ100", "TAZ300", "TB", "TB2", "TB2412", "TB367", "TBAABS",
"TBABBS", "TBAP12", "TBAV10", "TBBCBS", "TBC1NPLY", "TBC1NRLY",
"TBCAAS", "TBCADS", "TBCAES", "TBCBAS", "TBCBDS", "TBCBES",
"TBDCAS", "TBDCDS", "TBDCES", "TBE1OVM", "TBE1OVN", "TBE2PZN",
"TBE2UZN", "TBE4TWN", "TBE4TYN", "TBE4TYNC", "TBE5IWN", "TBE5IWNC",
"TBE5TWM", "TBE5TWN", "TBE5TWNC", "TBE5TYN", "TBGMSLV", "TBGMTLVI",
"TBGNSLV", "TBGNSLVC", "TBGNSLY", "TBGNTLVI", "TBIF5P11M51AZ1",
"TBIF5P21M52CZ1", "TBNT30", "TBUR20", "TBX200", "TBX205",
"TBX300", "TBX305", "TBX405", "TBXE05", "TBXG05", "TBZ200",
"TBZ205", "TBZ300", "TBZ305", "TBZ405", "TBZ800", "TBZE05",
"TBZG05", "TC2", "TCAP11", "TCAP12", "TCAV10", "TCTG05",
"TCY405", "TCYG05", "TD2", "TD367", "TD4HSJ", "TD4HTH", "TDABKS",
"TDABTS", "TDABUS", "TDAP11", "TDAV10", "TDAW10", "TDAW10M",
"TDAW10U", "TDFBAS", "TDGCKS", "TDGCTS", "TDGCUS", "TDHCAS",
"TDSY61", "TDUHZJ", "TDX8ZA", "TDXFVJ", "TE2", "TE51", "TEABKL",
"TEABTL", "TEAP12", "TEBBAL", "TECCKL", "TECCTL", "TEDCAL",
"TENT30", "TESY61", "TF08II51", "TF08J551", "TF08M351", "TF35II51",
"TF35J551", "TF35M351", "TF408", "TF419", "TF435", "TF448",
"TF48II51", "TF48J551", "TF48M351", "TFABAL", "TFABKL", "TFABSL",
"TFABTL", "TFABUL", "TFAP12", "TFAY10", "TFBCAL", "TFBCKL",
"TFBCSL", "TFBCTL", "TFBCUL", "TG08GCA1", "TG08GCS1", "TG08ICA1",
"TG08ICS1", "TG08M351", "TG08M3A1", "TG2", "TG35GCA1", "TG35GCS1",
"TG35ICA1", "TG35ICS1", "TG35M351", "TG35M3A1", "TG408",
"TG419", "TG435", "TG448", "TG48GCA1", "TG48GCS1", "TG48ICA1",
"TG48ICS1", "TG48M351", "TG48M3A1", "TGABAL", "TGABKL", "TGABSL",
"TGABTE", "TGABTL", "TGBN", "TGCCAL", "TGCCKL", "TGCCSL",
"TGCCTE", "TGCCTL", "TGFCAL", "TGFCTL", "TGFCUL", "TH308",
"TH348", "TJAC9S", "TJAN91", "TJAN9S", "TJBBAL", "TJBBTE",
"TJBBTL", "TJBBUL", "TJBCAL", "TJBCTE", "TJBCTL", "TJBCUL",
"TK308", "TK348", "TKACAL", "TKACTE", "TKACTL", "TKACUL",
"TLB310", "TLEF5D14A63ZZ1", "TLEF5D24M62ZZ1", "TLEF5D31M62ZZ1",
"TLEF5D51M66ZZ1", "TLEF5D61D7", "TLEF5P31M64ZZ1", "TLEF5P41D71ZZ1",
"TLEF5P44D71ZZ1", "TM4BUL", "TM4DBC", "TP260", "TPAD", "TPADJ",
"TPAE", "TPAEJ", "TQF8D62M53AZ1", "TQF8D82A51AZ1", "TR160",
"TR160T", "TR467", "TR567", "TR7969", "TR9145", "TR9245",
"TS08ICS1", "TS08MCS1", "TS31", "TS48ICS1", "TS6142", "TS6149",
"TS61E2", "TS61P2", "TS61P200", "TS61P9", "TS61P900", "TS61S200",
"TS61S900", "TS65E2", "TS65P2", "TS65P200", "TS65P9", "TS65P900",
"TS65S200", "TS65S900", "TS7202", "TS7206", "TS7432", "TS743200",
"TS7439", "TS743900", "TS7462", "TS7469", "TS7932", "TS793200",
"TS793900", "TS7962", "TS7969", "TS90C5", "TS90K5", "TS9145",
"TS91J500", "TS91K5", "TS91K500", "TS9245", "TS92K5", "TS92K500",
"TS94K2", "TS94K5", "TS97C2", "TS97C5", "TT132", "TT408",
"TT419", "TT435", "TT448", "TT508", "TT519", "TT535", "TT548",
"TT808", "TT819", "TT835", "TT848", "TTFN44", "TU308", "TU319",
"TU348", "TU408", "TU419", "TU435", "TU448", "TU467", "TU508",
"TU519", "TU535", "TU548", "TU567", "TU808", "TU819", "TU835",
"TU848", "TVUF", "TVUR20", "TVUR20U", "TW308", "TW319", "TW348",
"TW3T08", "TW3T19", "TW3T35", "TW3T48", "TWUR20", "TX31",
"TX71", "TY260", "TY260T", "U11", "U11T", "U2", "U2MAC",
"U2NAC", "U6UA", "U6UB", "U6UC", "U6UE", "U6UF", "U6UG",
"U6UJ", "U6UJT", "U6UK", "U6UR", "U6UR9", "U6UT", "U6UT9",
"U6UU", "U6UU9", "U6UW", "U6UWT", "U857", "U858", "U859533",
"U85T", "U9C1G6", "U9C1GH", "U9C1K6", "U9C1KH", "U9C2G6",
"U9C2K6", "U9CYG6", "U9CYK6", "U9VCK5", "UA5FV81P", "UA5FWC",
"UA5FWC1", "UA5FXH1P", "UA6FYC", "UA71", "UA9HR8", "UA9HR82PS",
"UA9HR8P", "UA9HR8PS", "UA9HZC", "UA9HZC1", "UA9HZH1P", "UA9HZHP",
"UARFJHP", "UARHB8P", "UARHE8", "UARHHA", "UARHJH1P", "UARHJHP",
"UARHRJ", "UB11", "UB31", "UB51", "UB53", "UB71", "UB91",
"UC11", "UC31", "UC71", "UC91", "UD11", "UD1Y11", "UD51",
"UD5FS0", "UD5FV81P", "UD5FWC", "UD5FXH1P", "UD5FXHP", "UD6FYC",
"UD71", "UD91", "UD9HR8", "UD9HR82PS", "UD9HR8P", "UD9HR8PS",
"UD9HZC", "UD9HZC1", "UD9HZC1CU1", "UD9HZH1P", "UD9HZH1PCU1",
"UD9HZHP", "UDC1G6", "UDC1K6", "UDC2G6", "UDC2K6", "UDC3G6",
"UDC3K6", "UDCAG5", "UDCAK5", "UDCCG5", "UDCCK5", "UDCEG5",
"UDCEK5", "UDCGG5", "UDCGK5", "UDCJG5", "UDCJK5", "UDCMG5",
"UDCMK5", "UDCNG5", "UDCNK5", "UDCSG6", "UDCSK6", "UDCUG5",
"UDCUG6", "UDCUK5", "UDCUK6", "UDCVG5", "UDCVK5", "UDCYG6",
"UDCYK6", "UDRFJHP", "UDRHB8P", "UDRHE8", "UDRHHA", "UDRHJH1P",
"UDRHJHP", "UDRHRJ", "UE11", "UE31", "UE51", "UE9HR8", "UE9HR8P",
"UE9HZC1", "UE9HZH1P", "UF11", "UF1Y32", "UF31", "UF51",
"UF8U52", "UF8UL2", "UF91", "UG31", "UG51", "UH11", "UH31",
"UH51", "UK11", "UK31", "UK51", "UL91", "UM11", "UM51", "UM71",
"UM91", "UMC7D2", "UN10", "UN13", "UN1A22", "UN71", "UN8B42",
"UN8D32", "UN8F42", "UN91", "UP11", "UR11", "UR31", "UR51",
"UR91", "URMD21", "US31", "US91", "USD135", "USD145", "USD1F5",
"USD1K5", "USD1W5", "USDBL5", "USDUK5", "USDUW5", "UT31",
"UT71", "UU11", "UU51", "UU6M", "UU71", "UU91", "UV51", "UV71",
"UV91", "UW71", "UW91", "UX11", "UX31", "UX51", "UX71", "UX91",
"UXC1", "UY11", "UY31", "UY51", "UY71", "UY91", "UZ10BC",
"UZ68BC", "UZA2BC", "UZA8BC", "UZBABD", "UZJ100LGNAEKW",
"V1DKS", "V1DVS", "V1JKS", "V1JVS", "V23CGRHE", "V23WGNXE",
"V23WGNXES", "V24WGNXF", "V24WGNXFS", "V24WNDF", "V24WNDFS",
"V24WNHF", "V24WNHFS", "V25WGNX", "V25WGRX", "V26WGNX", "V26WGNXS",
"V2DAC", "V2JAC", "V2W200", "V2W300", "V36MM01", "V36NN01",
"V36PP01", "V36RR01", "V36SS01", "V36TT01", "V37CC03", "V37DD03",
"V37EE01", "V37FF01", "V37GG01", "V3X208", "V3X308", "V3XG08",
"V43WGRXE", "V44WGNXF", "V44WGNXFS", "V44WNHF", "V45WGRX",
"V46WGNX", "V46WGRX", "V46WNH", "V46WNHS", "V4X208", "V4X300",
"V4X308", "V4X408", "V4XE08", "V4XG08", "V4Y208", "V4Y408",
"V4YG08", "V521L22HCR167", "V521SLLDA5865", "V521SLLDAR165",
"V5W208", "V5W408", "V5WG08", "V6419", "V6435", "V64WMN",
"V7419", "V7435", "V9X300", "VA", "VA51", "VA71", "VA91",
"VABHSH", "VABHVB", "VABHXH", "VAJ", "VAJI", "VAJIA", "VAL",
"VAM", "VAN", "VANA", "VB11", "VB31", "VB71", "VB84035",
"VB84035M", "VB84069", "VB84069M", "VB8435", "VB8469", "VB86035",
"VB86035M", "VB86069", "VB86069M", "VB8635", "VB8669", "VB94035",
"VB94069", "VB9435", "VB9469", "VB96035", "VB96069", "VB9635",
"VB9669", "VBBHSH", "VBBHVB", "VBBHXH", "VBW4035", "VBW4069",
"VBW435", "VBW469", "VBW6035", "VBW6069", "VBW635", "VBW669",
"VBY4035", "VBY4069", "VBY6035", "VBY6069", "VBZ4035", "VBZ4069",
"VBZ6035", "VBZ6069", "VBZ6E035", "VBZ6E069", "VC11", "VC31",
"VC419", "VC435", "VC51", "VC619", "VC635", "VC91", "VCA419",
"VCA435", "VCA619", "VCA635", "VCDZ", "VCM36V", "VD0419",
"VD0619", "VD11", "VD21SDDAAN735", "VD21SEEAAN735", "VD31",
"VD419", "VD435", "VD51", "VD619", "VD635", "VD71", "VD91",
"VDGCS", "VDGDS", "VDL", "VDM", "VDNS", "VDPA", "VDPAF",
"XWYWMX", "XWYWTP", "XWYWTX", "XWYWXT", "XWZLUR", "XX11",
"XX31", "XX51", "XY11", "XY31", "XY51", "Y3AA", "Y3AB", "Y3AC",
"Y3ACA", "Y3AE", "Y3AF", "Y3AG", "Y3AH", "Y3AHA", "Y3AL",
"Y3AP", "Y3AR", "Y3AS", "Y3AT", "Y3AW", "Y3AX", "Y3AY", "Y3AZ",
"Y3CN", "Y4CW", "Y4CZ", "Y4GB", "Y4GG", "Y4GM", "Y4GN", "Y4GR",
"Y4GU", "Y4GV", "Y4GW", "Y4GX", "Y4GY", "Y4GZ", "Y4MZ", "Y4NW",
"Y4NX", "Y4NY", "Y4NZ", "Y4RM", "Y4RN", "Y4TD", "Y4TN", "Y4TR",
"Y4TS", "Y4TT", "Y4TU", "Y4TV", "Y4TX", "Y4WC", "Y4WG", "Y4WH",
"Y4WK", "Y51AA01", "Y51BB0", "Y51BB01", "Y51CC01", "Y51DD01",
"Y51FF0", "Y51HEE0", "Y51HEE01", "Y910", "YA01", "YA1MFA",
"YA1MFB", "YA1MRA", "YA2MFA", "YA2MFB", "YA2MRA", "YA3MFA",
"YA3MFB", "YA3MRA", "YA41", "YA61", "YA81", "YA9S", "YAAMFA",
"YAAMFAAX", "YAAMFB", "YAAMFBBX", "YAAMPA", "YAAMRA", "YABMFA",
"YABMFAAX", "YABMFB", "YABMFBBX", "YABMPA", "YABMRA", "YASMFA",
"YASMFB", "YASMPA", "YASMRA", "YATMFA", "YATMFB", "YATMPA",
"YATMRA", "YAUMPA", "YAUMRA", "YB01", "YB1MFA", "YB1MFB",
"YB1MFC", "YB1MRB", "YB2MFA", "YB2MFB", "YB2MFC", "YB2MRB",
"YB2R", "YB3MFA", "YB3MFB", "YB3MFC", "YB3MRB", "YB4R", "YB61",
"YB81", "YBAMAA", "YBAMAAAX", "YBAMAB", "YBAMABAX", "YBAMAC",
"YBAMACAX", "YBAMADAX", "YBAMCB", "YBAMCBAX", "YBAMCC", "YBAMCCAX",
"YBAMDBAX", "YBAMDCAX", "YBAMFA", "YBAMFAAX", "YBAMFB", "YBAMFBAX",
"YBAMFBBX", "YBAMFC", "YBAMFCBX", "YBAMFCCX", "YBAMGBAX",
"YBAMHBAX", "YBAMHCAX", "YBAMRB", "YBB5D11M6", "YBB5P11M6",
"YBB5P21M5", "YBB5P31M5", "YBB5P51A4", "YBBMAA", "YBBMAB",
"YBBMABAX", "YBBMAC", "YBBMACAX", "YBBMADAX", "YBBMCB", "YBBMCBAX",
"YBBMCC", "YBBMCCAX", "YBBMDBAX", "YBBMDC", "YBBMDCAX", "YBBMFA",
"YBBMFAAX", "YBBMFB", "YBBMFBAX", "YBBMFBBX", "YBBMFC", "YBBMFCBX",
"YBBMFCCX", "YBBMGBAX", "YBBMHBAX", "YBBMHCAX", "YBBMPB",
"YBBMRB", "YBC5D31M6", "YBCP11M6", "YBCP41M6", "YBDMAB",
"YBDMAC", "YBDMADAX", "YBDMDC", "YBDMDCAX", "YBDMFA", "YBDMFB",
"YBDMFBAX", "YBDMFBBX", "YBDMFC", "YBDMFCBX", "YBDMFCCX",
"YBDMHCAX", "YBDMPB", "YBPMFB", "YBPMFC", "YBPMPB", "YBSMFA",
"YBSMFB", "YBSMFC", "YBSMRB", "YBTMFA", "YBTMFB", "YBTMFC",
"YBTMPB", "YBTMRB", "YBUMFA", "YBUMFB", "YBUMFC", "YBUMPB",
"YBUMRB", "YC1MFA", "YC1MFB", "YC1MFC", "YC21", "YC2MFA",
"YC2MFB", "YC2MFC", "YC3MFB", "YC3MFC", "YC41", "YC81", "YCAMAB",
"YCAMABAX", "YCAMAC", "YCAMACAX", "YCAMACAXL", "YCAMAD",
"YCAMADAX", "YCAMCB", "YCAMCBAX", "YCAMCC", "YCAMCCAX", "YCAMCCAXL",
"YCAMDB", "YCAMDBAX", "YCAMDC", "YCAMDCAX", "YCAMFB", "YCAMFBAX",
"YCAMFBBX", "YCAMFC", "YCAMFCBX", "YCAMFCCX", "YCAMGCAX",
"YCAMHC", "YCAMHCAX", "YCBMAB", "YCBMABAX", "YCBMAC", "YCBMACAX",
"YCBMACAXL", "YCBMAD", "YCBMADAX", "YCBMCB", "YCBMCBAX",
"YCBMCC", "YCBMCCAX", "YCBMCCAXL", "YCBMDB", "YCBMDBAX",
"YCBMDC", "YCBMDCAX", "YCBMFB", "YCBMFBAX", "YCBMFBBX", "YCBMFC",
"YCBMFCBX", "YCBMFCCX", "YCBMGC", "YCBMGCAX", "YCBMHC", "YCBMHCAX",
"YCDMAB", "YCDMABAX", "YCDMAC", "YCDMACAX", "YCDMACAXL",
"YCDMAD", "YCDMADAX", "YCDMCB", "YCDMCC", "YCDMCCAX", "YCDMCCAXL",
"YCDMDB", "YCDMDC", "YCDMDCAX", "YCDMFB", "YCDMFBAX", "YCDMFBBX",
"YCDMFC", "YCDMFCBX", "YCDMFCCX", "YCPMFB", "YCPMFC", "YCSMFB",
"YCSMFC", "YCTMFA", "YCTMFB", "YCTMFC", "YCUMFB", "YCUMFC",
"YD2MFC", "YD3MFC", "YDBMACAX", "YDBMACAXL", "YDBMBCAX",
"YDBMCCAXL", "YDBMDCAXL", "YDBMFCBX", "YDBMFCCX", "YDBMFCCXL",
"YDBMGCAXL", "YDBMHCAXL", "YDDMACAX", "YDDMACAXL", "YDDMCCAXL",
"YDDMDCAXL", "YDDMFCBX", "YDDMFCBXL", "YDDMFCCX", "YDDMFCCXL",
"YDDMHCAXL", "YDPMFC", "YDTMFC", "YDUMFC", "YE01", "YE41",
"YE81", "YF61", "YF81", "YG01", "YG41", "YM", "YM11", "YM31",
"YM91", "YN", "YN1P", "YN2B", "YN2BCF", "YN2BDG", "YN2C",
"YN2M", "YN2MC", "YN2MD", "YN4M", "YN5B", "YN5M", "YN9P",
"YN9S", "YNA", "YNSF5DH1M6", "YNSF5P71M5", "YNSF5P91M6",
"YP", "YP11", "YP31", "YP51", "YP91", "YPA", "YS", "YS31",
"YS3B55D", "YS3F55E", "YS3F55L", "YS3F59E", "YS3GG4JA6A01",
"YS3GG4LA6F01", "YS3GG4LM6F02", "YS3GG4ZA6A01", "YS3GG4ZA6F01",
"YS3GG4ZM6A01", "YS3GG4ZM6F01", "YS51", "YS91", "YT11", "YT54Y",
"YT71", "YT91", "YU11", "YU31", "YU51", "YU71", "YV1PW10BD",
"YV1PW68BC", "YV1PW79B0", "YV1PW79B1", "YV1PWA2BC", "YV1PWA8B1",
"YV1PWA8BC", "YV1PWA8BD", "YV1PWARBC", "YV1PZ68BC", "YV1PZA2BC",
"YV1PZA8B4", "YV1PZA8BC", "YV71", "YV91", "YY23P", "YYCAD2M",
"Z10", "Z12", "Z12AA01", "Z12AA02", "Z12BB01", "Z16AMJ",
"Z16AMN", "Z34AA01", "Z34AA02", "Z34AA03", "Z34AA04", "Z34AA05",
"Z34BB01", "Z34BB02", "Z34BB03", "Z51AA01", "Z51BB01", "Z51CC01",
"ZA31", "ZAAMFA/BX", "ZAAMFAAX", "ZAAMFABX", "ZAAMFBAX",
"ZAAMNABX", "ZAAMPA", "ZAAMRA", "ZADA", "ZADAB", "ZADAC",
"ZADB", "ZADBB", "ZADBC", "ZADD", "ZADDB", "ZADE", "ZADEB",
"ZADFT", "ZADH", "ZADJ", "ZADM", "ZADN", "ZAKE", "ZAKET",
"ZAKF", "ZAKH", "ZAKJ", "ZALAT", "ZALB", "ZALC", "ZALF",
"ZALG", "ZALH", "ZALHT", "ZALJ", "ZAPAPA", "ZAPMFAAX", "ZAPMFAAY",
"ZAPMNAAX", "ZAPMPA", "ZARMFAAX", "ZARMFABX", "ZARMFBAX",
"ZARMNAAX", "ZARMPA", "ZARMRA", "ZATMFAAX", "ZATMFABX", "ZATMFBAX",
"ZATMNAAX", "ZAXZ", "ZAZA", "ZAZAT", "ZAZB", "ZAZBT", "ZAZC",
"ZAZD", "ZAZE", "ZAZF", "ZAZH", "ZAZJ", "ZAZK", "ZAZL", "ZAZT",
"ZAZTT", "ZAZU", "ZAZY", "ZAZZ", "ZB31", "ZB51", "ZB71",
"ZB8S", "ZB8Y", "ZB8Z", "ZBAMAAAX", "ZBAMABAX", "ZBAMDAAX",
"ZBAMDBAX", "ZBAMDCAX", "ZBAMFAAX", "ZBAMFABX", "ZBAMFBAX",
"ZBAMNAAX", "ZBAMNBAX", "ZBAMRB", "ZBC", "ZBD", "ZBPANBAX",
"ZBPANCAX", "ZBPARB", "ZBPMABAY", "ZBPMACAY", "ZBPMBBAY",
"ZBPMBCAY", "ZBPMCBAX", "ZBPMDCAY", "ZBPMFAAY", "ZBPMFABY",
"ZBPMFBAY", "ZBPMGBAY", "ZBPMGCAY", "ZBPMHCAY", "ZBPMNAAX",
"ZBPMNABY", "ZBPMNBAY", "ZBPMNCAX", "ZBPMNCAY", "ZBPMRB",
"ZBPWFAAY", "ZBPWFABY", "ZBPWNBAY", "ZBRMAAAX", "ZBRMABAX",
"ZBRMACAX", "ZBRMCBAX", "ZBRMDAAX", "ZBRMDBAX", "ZBRMDCAX",
"ZBRMFAAX", "ZBRMFABX", "ZBRMFBAX", "ZBRMGBAX", "ZBRMGCAX",
"ZBRMHCAX", "ZBRMNAAX", "ZBRMNBAX", "ZBRMNCAX", "ZBRMRB",
"ZBTMFAAX", "ZBTMFABX", "ZBTMFBAX", "ZBTMNAAX", "ZBTMNBAX",
"ZBTMNCAX", "ZBZMACAY", "ZBZMDCAY", "ZBZMFAAY", "ZBZMFABY",
"ZBZMFBAY", "ZBZMGCAY", "ZBZMHCAY", "ZBZMNBAY", "ZBZMNCAY",
"ZC31", "ZC51", "ZCBHZH", "ZCBHZW", "ZCPANBAX", "ZCPANBBX",
"ZCPANCAX", "ZCPANCBX", "ZCPMABAY", "ZCPMACAY", "ZCPMAGAY",
"ZCPMBBAY", "ZCPMBCAY", "ZCPMCBAY", "ZCPMCCAY", "ZCPMDBAY",
"ZCPMDCAY", "ZCPMFAAY", "ZCPMFABY", "ZCPMGCAY", "ZCPMHCAX",
"ZCPMHCAY", "ZCPMNBAY", "ZCPMNBBY", "ZCPMNCAY", "ZCPMNCBY",
"ZCPWABAY", "ZCPWACAY", "ZCPWCBAY", "ZCPWCCAY", "ZCPWDBAY",
"ZCPWDCAY", "ZCPWNBAY", "ZCPWNCAY", "ZCRMABAX", "ZCRMACAX",
"ZCRMAGAX", "ZCRMCBAX", "ZCRMCCAX", "ZCRMDBAX", "ZCRMDCAX",
"ZCRMFAAX", "ZCRMFABX", "ZCRMGCAX", "ZCRMHCAX", "ZCRMNBAX",
"ZCRMNBBX", "ZCRMNCAX", "ZCRMNCBX", "ZCTMCBAX", "ZCTMCCAX",
"ZCTMNBAX", "ZCTMNBBX", "ZCTMNCAX", "ZCTMNCBX", "ZCZMABAY",
"ZCZMACAY", "ZCZMAGAY", "ZCZMCBAY", "ZCZMCCAY", "ZCZMDBAY",
"ZCZMDCAY", "ZCZMDGAY", "ZCZMFAAY", "ZCZMFABY", "ZCZMGCAY",
"ZCZMGGAY", "ZCZMHCAY", "ZCZMHGAY", "ZCZMNBAY", "ZCZMNBBY",
"ZCZMNCAY", "ZCZMNCBY", "ZD11", "ZD31", "ZD51", "ZD71", "ZE2",
"ZE31", "ZF111", "ZF31", "ZFANF6EK6", "ZFANF6EKA", "ZG31",
"ZH51", "ZH71", "ZHNC9L", "ZHNE9L", "ZM31", "ZN31", "ZN57",
"ZN67", "ZN8M", "ZP31", "ZR31", "ZR71", "ZRHNYH", "ZRHNYW",
"ZT14", "ZT24", "ZT35", "ZT37", "ZT38", "ZT45", "ZT47", "ZT48",
"ZT55", "ZT57", "ZT58", "ZT65", "ZT67", "ZT68", "ZV18", "ZV30",
"ZV38", "ZV41", "ZV81", "ZW41", "ZW61", "ZW81", "ZZT220LAEMNKW",
"ZZT220LALMNKW", "ZZT221LAEMEKW", "ZZT221LAEPEKW", "ZZT221LALMEKW",
"ZZT221LALPEKW", "ZZT230LBLFGHW", "ZZT231LBLFVFW", "ZZT251LALMEKW",
"ZZT251LALMNKW", "ZZT251LALPEKW", "ZZW30LAKMQHW"), class = "factor")), .Names
= c("Lib_Marque__MRQ_",
"Lib_Modele__MOD_", "Lib_Carrosserie__CAR_", "Lib_Energie__ENE_",
"Puiss_Fiscale", "Nb_Places", "Nb_Cylindres", "Cylindree", "Vitesse_Max",
"Puiss_Reelle_kW", "Puiss_Reelle_DIN", "Regime_Puiss", "Couple_Max",
"Regime_Couple_Max", "Nb_Rapports", "Longueur", "Largeur", "Hauteur",
"Empattement", "Voie_AV", "Voie_AR", "Poids_Vide", "PTAC", "Charge_Utile",
"Valeur_Neuf_Orig_EUR", "Code_SRA"), row.names = c(NA, 10L), class =
"data.frame")
Thank you for your kind help

Change range of "fill" values in choropleth map R

Any help would be greatly appreciated!!
I'm trying to create a choropleth map in R that shows the counties of texas, color-coded by their population ranges.
My problem is that the range of populations is too large. The highest population is over 4 million, but most of the counties have a population under 50,000. The criteria for the fill is: (0-1mil), (1-2mil), (2-3mil), (3-4mil), (4-5mil) but almost all fall under 0-1mil.
How can I change the legend to account for different ranges of numbers? For example, maybe:
(0-1,000), (1,000-10,000), (10,000-100,000), (100,000-1mil), (1mil-5mil)
Here's the code I wrote to plot the data:
txplot <- ggplot(txczpop, aes(fill=pop2014)) + geom_map(txmap)
tm_shape(txmap) +
tm_fill("pop2014", title="TX County Population", palette = "PRGn") +
tm_borders(alpha=.5) +
tm_style_beaver()
Here's the result:
[![enter image description here][1]][1]
I'm using a census county shapefile and population also retrieved from a census file.
Here's the output of my population data:
txczpop <- structure(list(county_fips = c(48001L, 48003L, 48005L, 48007L,
48009L, 48011L, 48013L, 48015L, 48017L, 48019L, 48021L, 48023L,
48025L, 48027L, 48029L, 48031L, 48033L, 48035L, 48037L, 48039L,
48041L, 48043L, 48045L, 48047L, 48049L, 48051L, 48053L, 48055L,
48057L, 48059L, 48061L, 48063L, 48065L, 48067L, 48069L, 48071L,
48073L, 48075L, 48077L, 48079L, 48081L, 48083L, 48085L, 48087L,
48089L, 48091L, 48093L, 48095L, 48097L, 48099L, 48101L, 48103L,
48105L, 48107L, 48109L, 48111L, 48113L, 48115L, 48117L, 48119L,
48121L, 48123L, 48125L, 48127L, 48129L, 48131L, 48133L, 48135L,
48137L, 48141L, 48139L, 48143L, 48145L, 48147L, 48149L, 48151L,
48153L, 48155L, 48157L, 48159L, 48161L, 48163L, 48165L, 48167L,
48169L, 48171L, 48173L, 48175L, 48177L, 48179L, 48181L, 48183L,
48185L, 48187L, 48189L, 48191L, 48193L, 48195L, 48197L, 48199L,
48201L, 48203L, 48205L, 48207L, 48209L, 48211L, 48213L, 48215L,
48217L, 48219L, 48221L, 48223L, 48225L, 48227L, 48229L, 48231L,
48233L, 48235L, 48237L, 48239L, 48241L, 48243L, 48245L, 48247L,
48249L, 48251L, 48253L, 48255L, 48257L, 48259L, 48261L, 48263L,
48265L, 48267L, 48269L, 48271L, 48273L, 48275L, 48283L, 48277L,
48279L, 48281L, 48285L, 48287L, 48289L, 48291L, 48293L, 48295L,
48297L, 48299L, 48301L, 48303L, 48305L, 48313L, 48315L, 48317L,
48319L, 48321L, 48323L, 48307L, 48309L, 48311L, 48325L, 48327L,
48329L, 48331L, 48333L, 48335L, 48337L, 48339L, 48341L, 48343L,
48345L, 48347L, 48349L, 48351L, 48353L, 48355L, 48357L, 48359L,
48361L, 48363L, 48365L, 48367L, 48369L, 48371L, 48373L, 48375L,
48377L, 48379L, 48381L, 48383L, 48385L, 48387L, 48389L, 48391L,
48393L, 48395L, 48397L, 48399L, 48401L, 48403L, 48405L, 48407L,
48409L, 48411L, 48413L, 48415L, 48417L, 48419L, 48421L, 48423L,
48425L, 48427L, 48429L, 48431L, 48433L, 48435L, 48437L, 48439L,
48441L, 48443L, 48445L, 48447L, 48449L, 48451L, 48453L, 48455L,
48457L, 48459L, 48461L, 48463L, 48465L, 48467L, 48469L, 48471L,
48473L, 48475L, 48477L, 48479L, 48481L, 48483L, 48485L, 48487L,
48489L, 48491L, 48493L, 48495L, 48497L, 48499L, 48501L, 48503L,
48505L, 48507L), county_name = c("Anderson", "Andrews", "Angelina",
"Aransas", "Archer", "Armstrong", "Atascosa", "Austin", "Bailey",
"Bandera", "Bastrop", "Baylor", "Bee", "Bell", "Bexar", "Blanco",
"Borden", "Bosque", "Bowie", "Brazoria", "Brazos", "Brewster",
"Briscoe", "Brooks", "Brown", "Burleson", "Burnet", "Caldwell",
"Calhoun", "Callahan", "Cameron", "Camp", "Carson", "Cass", "Castro",
"Chambers", "Cherokee", "Childress", "Clay", "Cochran", "Coke",
"Coleman", "Collin", "Collingsworth", "Colorado", "Comal", "Comanche",
"Concho", "Cooke", "Coryell", "Cottle", "Crane", "Crockett",
"Crosby", "Culberson", "Dallam", "Dallas", "Dawson", "Deaf Smith",
"Delta", "Denton", "DeWitt", "Dickens", "Dimmit", "Donley", "Duval",
"Eastland", "Ector", "Edwards", "El Paso", "Ellis", "Erath",
"Falls", "Fannin", "Fayette", "Fisher", "Floyd", "Foard", "Fort Bend",
"Franklin", "Freestone", "Frio", "Gaines", "Galveston", "Garza",
"Gillespie", "Glasscock", "Goliad", "Gonzales", "Gray", "Grayson",
"Gregg", "Grimes", "Guadalupe", "Hale", "Hall", "Hamilton", "Hansford",
"Hardeman", "Hardin", "Harris", "Harrison", "Hartley", "Haskell",
"Hays", "Hemphill", "Henderson", "Hidalgo", "Hill", "Hockley",
"Hood", "Hopkins", "Houston", "Howard", "Hudspeth", "Hunt", "Hutchinson",
"Irion", "Jack", "Jackson", "Jasper", "Jeff Davis", "Jefferson",
"Jim Hogg", "Jim Wells", "Johnson", "Jones", "Karnes", "Kaufman",
"Kendall", "Kenedy", "Kent", "Kerr", "Kimble", "King", "Kinney",
"Kleberg", "Knox", "La Salle", "Lamar", "Lamb", "Lampasas", "Lavaca",
"Lee", "Leon", "Liberty", "Limestone", "Lipscomb", "Live Oak",
"Llano", "Loving", "Lubbock", "Lynn", "Madison", "Marion", "Martin",
"Mason", "Matagorda", "Maverick", "McCulloch", "McLennan", "McMullen",
"Medina", "Menard", "Midland", "Milam", "Mills", "Mitchell",
"Montague", "Montgomery", "Moore", "Morris", "Motley", "Nacogdoches",
"Navarro", "Newton", "Nolan", "Nueces", "Ochiltree", "Oldham",
"Orange", "Palo Pinto", "Panola", "Parker", "Parmer", "Pecos",
"Polk", "Potter", "Presidio", "Rains", "Randall", "Reagan", "Real",
"Red River", "Reeves", "Refugio", "Roberts", "Robertson", "Rockwall",
"Runnels", "Rusk", "Sabine", "San Augustine", "San Jacinto",
"San Patricio", "San Saba", "Schleicher", "Scurry", "Shackelford",
"Shelby", "Sherman", "Smith", "Somervell", "Starr", "Stephens",
"Sterling", "Stonewall", "Sutton", "Swisher", "Tarrant", "Taylor",
"Terrell", "Terry", "Throckmorton", "Titus", "Tom Green", "Travis",
"Trinity", "Tyler", "Upshur", "Upton", "Uvalde", "Val Verde",
"Van Zandt", "Victoria", "Walker", "Waller", "Ward", "Washington",
"Webb", "Wharton", "Wheeler", "Wichita", "Wilbarger", "Willacy",
"Williamson", "Wilson", "Winkler", "Wise", "Wood", "Yoakum",
"Young", "Zapata", "Zavala"), pop2014 = c(57627L, 17477L, 87750L,
24972L, 8811L, 1955L, 47774L, 29114L, 6910L, 20892L, 78069L,
3592L, 32863L, 329140L, 1855866L, 10812L, 652L, 17780L, 93275L,
338124L, 209152L, 9173L, 1536L, 7194L, 37653L, 17253L, 44943L,
39810L, 21797L, 13513L, 420392L, 12621L, 6013L, 30261L, 7781L,
38145L, 50902L, 7089L, 10370L, 2935L, 3254L, 8430L, 885241L,
3017L, 20719L, 123694L, 13550L, 4050L, 38761L, 75562L, 1415L,
4950L, 3812L, 5899L, 2266L, 7135L, 2518638L, 13372L, 19195L,
5238L, 753363L, 20684L, 2218L, 11089L, 3543L, 11533L, 18176L,
153904L, 1879L, 833487L, 159317L, 40147L, 16989L, 33752L, 24833L,
3831L, 5949L, 1275L, 685345L, 10600L, 19762L, 18531L, 19425L,
314198L, 6435L, 25520L, 1291L, 7549L, 20462L, 23044L, 123534L,
123204L, 27172L, 147250L, 34720L, 3147L, 8199L, 5509L, 3928L,
55621L, 4441370L, 67336L, 6089L, 5769L, 185025L, 4180L, 79290L,
831073L, 34848L, 23577L, 53921L, 35921L, 22741L, 36651L, 3211L,
88493L, 21773L, 1574L, 8855L, 14739L, 35552L, 2204L, 252235L,
5255L, 41353L, 157456L, 19936L, 14906L, 111236L, 38880L, 400L,
785L, 50562L, 4438L, 262L, 3526L, 32190L, 3858L, 7474L, 49523L,
13574L, 20156L, 19721L, 16742L, 16861L, 78117L, 23524L, 3553L,
12091L, 19510L, 86L, 293974L, 5771L, 13861L, 10149L, 5460L, 4071L,
36519L, 57023L, 8199L, 243441L, 805L, 47894L, 2147L, 155830L,
24256L, 4870L, 9076L, 19416L, 518947L, 22148L, 12743L, 1153L,
65301L, 48195L, 14138L, 15093L, 356221L, 10758L, 2070L, 83433L,
28096L, 23769L, 123164L, 9908L, 15893L, 46079L, 121627L, 6976L,
11032L, 128220L, 3755L, 3371L, 12446L, 14349L, 7302L, 928L, 16500L,
87809L, 10416L, 53923L, 10350L, 8610L, 27099L, 66915L, 5622L,
3162L, 17328L, 3343L, 25515L, 3084L, 218842L, 8694L, 62955L,
9405L, 1339L, 1403L, 3972L, 7581L, 1945360L, 135143L, 927L, 12739L,
1608L, 32506L, 116608L, 1151145L, 14224L, 21418L, 40354L, 3454L,
27117L, 48974L, 52910L, 91081L, 69789L, 46820L, 11625L, 34438L,
266673L, 41168L, 5714L, 132355L, 12973L, 21903L, 489250L, 46402L,
7821L, 61638L, 42852L, 8286L, 18350L, 14319L, 12267L)), .Names = c("county_fips",
"county_name", "pop2014"), row.names = c(5100L, 5101L, 5103L,
5106L, 5107L, 5109L, 5112L, 5114L, 5116L, 5118L, 5120L, 5121L,
5124L, 5126L, 5128L, 5129L, 5131L, 5133L, 5136L, 5137L, 5140L,
5141L, 5143L, 5146L, 5147L, 5150L, 5152L, 5153L, 5156L, 5158L,
5159L, 5161L, 5163L, 5166L, 5168L, 5170L, 5171L, 5174L, 5176L,
5178L, 5179L, 5182L, 5183L, 5185L, 5188L, 5190L, 5192L, 5194L,
5195L, 5198L, 5200L, 5201L, 5203L, 5205L, 5208L, 5209L, 5212L,
5214L, 5215L, 5218L, 5219L, 5221L, 5224L, 5226L, 5228L, 5230L,
5232L, 5233L, 5235L, 5239L, 5237L, 5242L, 5244L, 5245L, 5248L,
5249L, 5251L, 5254L, 5256L, 5257L, 5260L, 5261L, 5264L, 5265L,
5268L, 5270L, 5272L, 5274L, 5276L, 5278L, 5280L, 5281L, 5284L,
5286L, 5288L, 5290L, 5292L, 5293L, 5296L, 5298L, 5300L, 5301L,
5303L, 5306L, 5308L, 5309L, 5312L, 5314L, 5316L, 5317L, 5319L,
5321L, 5323L, 5326L, 5327L, 5330L, 5332L, 5334L, 5335L, 5337L,
5339L, 5341L, 5343L, 5346L, 5348L, 5349L, 5352L, 5354L, 5356L,
5357L, 5360L, 5362L, 5364L, 5365L, 5368L, 5369L, 5372L, 5374L,
5382L, 5376L, 5378L, 5379L, 5383L, 5385L, 5388L, 5390L, 5392L,
5394L, 5396L, 5398L, 5400L, 5401L, 5404L, 5412L, 5413L, 5416L,
5418L, 5419L, 5421L, 5406L, 5407L, 5409L, 5423L, 5425L, 5427L,
5429L, 5432L, 5434L, 5435L, 5438L, 5440L, 5442L, 5443L, 5446L,
5448L, 5449L, 5451L, 5453L, 5456L, 5457L, 5460L, 5461L, 5464L,
5465L, 5468L, 5470L, 5472L, 5474L, 5476L, 5477L, 5480L, 5482L,
5484L, 5486L, 5488L, 5489L, 5491L, 5494L, 5496L, 5498L, 5499L,
5501L, 5504L, 5505L, 5508L, 5510L, 5511L, 5514L, 5516L, 5518L,
5520L, 5522L, 5524L, 5526L, 5527L, 5530L, 5531L, 5533L, 5536L,
5537L, 5540L, 5542L, 5544L, 5546L, 5547L, 5550L, 5552L, 5554L,
5555L, 5558L, 5559L, 5562L, 5563L, 5566L, 5568L, 5569L, 5571L,
5574L, 5575L, 5578L, 5579L, 5582L, 5584L, 5585L, 5587L, 5590L,
5592L, 5594L, 5595L, 5598L, 5600L, 5602L, 5604L, 5606L), class = "data.frame")
I just created a new column in the population dataframe that summarizes the population based on the ranges that I want to use, and then use that as the criteria for the fill:
txczpop$poprange[txczpop$pop2014 >= 0 & txczpop < 1000] <- "0-1,000"
txczpop$poprange[txczpop$pop2014 >= 1000 & txczpop < 10000] <- "1-10,000"
txczpop$poprange[txczpop$pop2014 >= 10000 & txczpop$pop2014 < 100000] <- "10,000-100,000"
txczpop$poprange[txczpop$pop2014 >= 100000 & txczpop$pop2014 < 1000000] <- "100,000 - 1,000,000"
txczpop$poprange[txczpop$pop2014 >= 1000000 & txczpop$pop2014 <= 5000000] <- "1,000,000 - 5,000,000"

Fitting tau(time constant) over a specific period using ggplot2

I apologize in advance for the specificity of this question, I'm hoping my neuroscience jargon doesn't confuse things.
I have current traces from single cell recordings and I need to fit a tau from the peak to 4 seconds after the peak out on each trace. In reality, this is just an exponential decay.
So what I'm looking for is a ggplot overlay of the fit (so really a fit line over the period requested.) something along the lines of stat_smooth()
My data looks like follow:
dput(stackover_data)
structure(list(Time = c(0.09990001, 0.19990001, 0.29990001, 0.39990001,
0.49990001, 0.59990001, 0.69990001, 0.79990001, 0.89990001, 0.99990001,
1.09990001, 1.19990001, 1.29990001, 1.39990001, 1.49990001, 1.59990001,
1.69990001, 1.79990001, 1.89990001, 1.99990001, 2.09990001, 2.19990001,
2.29990001, 2.39990001, 2.49990001, 2.59990001, 2.69990001, 2.79990001,
2.89990001, 2.99990001, 3.09990001, 3.19990001, 3.29990001, 3.39990001,
3.49990001, 3.59990001, 3.69990001, 3.79990001, 3.89990001, 3.99990001,
4.09990001, 4.19990001, 4.29990001, 4.39990001, 4.49990001, 4.59990001,
4.69990001, 4.79990001, 4.89990001, 4.99990001, 5.09990001, 5.19990001,
5.29990001, 5.39990001, 5.49990001, 5.59990001, 5.69990001, 5.79990001,
5.89990001, 5.99990001, 6.09990001, 6.19990001, 6.29990001, 6.39990001,
6.49990001, 6.59990001, 6.69990001, 6.79990001, 6.89990001, 6.99990001,
7.09990001, 7.19990001, 7.29990001, 7.39990001, 7.49990001, 7.59990001,
7.69990001, 7.79990001, 7.89990001, 7.99990001, 8.09990001, 8.19990001,
8.29990001, 8.39990001, 8.49990001, 8.59990001, 8.69990001, 8.79990001,
8.89990001, 8.99990001, 9.09990001, 9.19990001, 9.29990001, 9.39990001,
9.49990001, 9.59990001, 9.69990001, 9.79990001, 9.89990001, 9.99990001,
10.09990001, 10.19990001, 10.29990001, 10.39990001, 10.49990001,
10.59990001, 10.69990001, 10.79990001, 10.89990001, 10.99990001,
11.09990001, 11.19990001, 11.29990001, 11.39990001, 11.49990001,
11.59990001, 11.69990001, 11.79990001, 11.89990001, 11.99990001,
12.09990001, 12.19990001, 12.29990001, 12.39990001, 12.49990001,
12.59990001, 12.69990001, 12.79990001, 12.89990001, 12.99990001,
13.09990001, 13.19990001, 13.29990001, 13.39990001, 13.49990001,
13.59990001, 13.69990001, 13.79990001, 13.89990001, 13.99990001,
14.09990001, 14.19990001, 14.29990001, 14.39990001, 14.49990001,
14.59990001, 14.69990001, 14.79990001, 14.89990001, 14.99990001,
15.09990001, 15.19990001, 15.29990001, 15.39990001, 15.49990001,
15.59990001, 15.69990001, 15.79990001, 15.89990001, 15.99990001,
16.09990001, 16.19990001, 16.29990001, 16.39990001, 16.49990001,
16.59990001, 16.69990001, 16.79990001, 16.89990001, 16.99990001,
17.09990001, 17.19990001, 17.29990001, 17.39990001, 17.49990001,
17.59990001, 17.69990001, 17.79990001, 17.89990001, 17.99990001,
18.09990001, 18.19990001, 18.29990001, 18.39990001, 18.49990001,
18.59990001, 18.69990001, 18.79990001, 18.89990001, 18.99990001,
19.09990001, 19.19990001, 19.29990001, 19.39990001, 19.49990001,
19.59990001, 19.69990001, 19.79990001, 19.89990001, 19.99990001
), `Trace 1` = c(-3.08656892325052, 9.36821982641837, 8.13806079083122,
10.7039590839898, 7.25670468903547, 4.31122291688919, 1.77905971163193,
-6.27606834721828, -8.65955381985049, -10.1445673910916, -10.6649772153892,
-6.52301948183154, -11.9757817854835, -0.976254254762154, 0.237467076202677,
-11.8114896779541, -11.0022757370468, -16.1845427042923, 2.70565927469852,
-18.9048281652216, -22.153682283437, -4363.32044948884, -3470.59111611883,
-2877.51064886248, -2253.51505229908, -1876.62974792002, -1541.14546478629,
-1288.26617158403, -1232.52313999354, -1042.98549163259, -938.795146277054,
-810.913567086442, -736.390770574588, -682.044521632168, -638.575324886466,
-596.587948389699, -629.282103146111, -569.200610245336, -587.387817942122,
-521.939307772762, -533.776693538631, -514.782451411908, -445.949395199026,
-451.026618716539, -461.669600651513, -442.372477296489, -426.132547857502,
-452.471101919398, -449.377497412324, -436.817659066873, -487.464805660851,
-442.915455035179, -458.666741489705, -454.990437793055, -455.173154690614,
-426.885702219019, -456.985443835707, -408.869318611773, -442.418742303429,
-407.42593099033, -414.538253423006, -316.036755461507, -248.395118743017,
-198.708015370115, -183.88480278352, -160.041754268138, -139.020785864805,
-123.701641615743, -137.253323547789, -124.240619047461, -121.512859107349,
-113.719386521321, -102.98429740535, -118.721098087137, -109.789471870234,
-122.145399997255, -109.542467905009, -96.6725326170008, -108.16233877188,
-94.1092968366083, -88.0987495250118, -89.2245425850472, -96.3495439993499,
-110.340434956898, -98.8777265479938, -88.0674013452629, -102.755317774957,
-91.0752842494157, -107.959830375198, -78.8424385901398, -93.7743443479161,
-98.3591889757604, -72.3214090579355, -85.6296201608712, -112.596656084088,
-115.518068650615, -110.973655632476, -78.8021307215932, -85.6443070182152,
-93.1744356389988, -100.483987323044, -87.6672104421484, -83.6481077757535,
-82.1465876740715, -86.7838666454595, -75.9066755520263, -86.6416980998645,
-88.9405806921788, -74.0592581080291, -86.3433338300531, -93.5114839187431,
-91.1875849041866, -82.7018083540351, -102.859075734953, -82.1494206590809,
-79.2197323780198, -78.1558787387238, -86.2649418863144, -93.5271994290692,
-84.6678528566242, -71.4828270654073, -69.5618263581887, -67.2920558863641,
-58.1490330439793, -59.8163238740351, -73.6957797622946, -61.7673947702343,
-63.6492255747164, -64.043638367468, -73.8301991524909, -69.3055992018769,
-65.9342860783478, -74.9891521715357, -74.5779808619617, -69.9029875902787,
-69.746935396023, -71.35455530782, -73.5279471991205, -77.8000626250279,
-74.6065254864801, -64.0834786591292, -45.1346212136811, -43.1615385011179,
-42.554841323715, -50.276566542849, -56.1940469314277, -49.6368473019083,
-53.9842269565738, -54.1480156577708, -48.2160751112714, -43.2902743874793,
-46.4358385791469, -58.4459814967147, -49.0443619038303, -56.8007684056415,
-56.3345802020277, -40.1704617527471, -38.2624410086947, -39.9339279963857,
-27.7637250414188, -40.8686520798649, -30.9246406597275, -32.70021580322,
-28.7536071219405, -32.4403271637661, -30.3389870650563, -23.2866770834185,
-40.349370835336, -39.7478049410975, -38.4648592612063, -37.4191914226093,
-52.1259539643142, -38.0993644763616, -37.5493511061199, -25.0794144286873,
-32.6165749053184, -17.2616237291667, -32.1515419380766, -27.0814392288745,
-26.2440551871993, -17.5882979851251, -19.852012057918, -22.1408312947152,
-21.3395092026716, -28.0789344732281, -19.6443281019371, -26.6585778398899,
-24.2994817465722, -27.847437388783, -22.0565059455712, -24.8747905836351,
-30.7544250721296, -29.9924061105416, -22.5728855329732, -24.9767037068316,
-18.8208568928653, -10.7306087216159, -16.4281210876173, -19.3057174287183,
-15.9745523586581), `Trace 2` = c(5.94927992143286, 1.42121402161905,
6.78788136514507, 3.33970424403748, -3.73956433922802, -7.3097330836793,
-9.18242380095097, 3.29952017048882, 5.17208246028, 1.53238537592179,
6.90832098860733, 3.16748380079213, 5.49988319742749, 3.86758484926656,
11.981378748128, -0.208159377585758, -7.2781503569274, 1.71389537416221,
-4.77614396689646, -0.561115871778583, -14.5385068323377, -4944.63006397872,
-3891.23141079918, -3065.66300899921, -2527.61853791531, -2060.05223709386,
-1763.27814995793, -1451.77884853301, -1368.42409410389, -1115.3385743493,
-990.942590410893, -852.951182088994, -920.516421149141, -860.486324532349,
-751.257935697359, -768.757880984424, -713.935725464811, -715.011716140783,
-616.355633698422, -672.133827760044, -629.418857335266, -607.342562427532,
-599.657392949772, -553.265193759536, -572.878306401819, -583.153736972572,
-589.661926862833, -527.552306430313, -553.672277977987, -539.906254466276,
-525.491319968336, -564.876755897633, -505.363603776286, -575.649358123809,
-497.897048596953, -544.360501913781, -483.501835830955, -533.085516954168,
-478.007776808595, -453.333986756674, -447.125338584774, -380.268661132557,
-253.127091546528, -227.877427383931, -191.488369613846, -166.799480062655,
-171.446527550207, -156.775073739292, -148.804014388301, -151.79670303645,
-152.599645619669, -113.40778617347, -133.161498039771, -129.929086626311,
-156.827022418459, -146.618934465797, -94.20997521855, -124.514491421933,
-89.8538131075507, -91.6500841191965, -113.887119052802, -109.971138752404,
-122.532101557384, -107.714865018275, -120.258046104427, -133.296582343699,
-111.726093380577, -121.533575165211, -93.2177144160483, -97.3820468959891,
-111.294540122284, -100.913019601926, -90.8456358331201, -94.143801546019,
-89.9179990101121, -79.3197988311624, -87.0020882554621, -103.315348613102,
-92.6091563297179, -87.3900461813473, -106.61173718685, -117.18534688083,
-106.417237368758, -114.977458547258, -101.759575332149, -93.2156781534656,
-79.4452885332048, -83.8035016923155, -85.7770898942133, -80.151862850598,
-72.4787832080729, -75.4887322569144, -70.8074563945233, -76.9714115362765,
-74.2305756099668, -72.7994824773122, -86.4890002605112, -68.5241155035978,
-76.723559709657, -60.5721619300473, -64.185161607482, -81.0777473166996,
-59.7023719535658, -48.0615168793405, -63.7668096308392, -69.0412888697281,
-70.9894443873153, -48.8366672284658, -43.1003899300401, -50.5591327356918,
-65.184353265464, -52.2850955061746, -66.0074402595226, -69.3081002474696,
-69.3876079446205, -53.0919105504865, -69.3289906081927, -63.5198462609014,
-70.9316181916525, -68.753726760587, -57.1360889764902, -45.7297495037924,
-45.0225501894778, -45.7487568762369, -46.486850874694, -46.7437348684622,
-41.1396209831975, -38.5056250833188, -49.8076229939374, -46.9868446480308,
-38.4639795698766, -40.8336417843587, -49.9810721301961, -58.7820616810459,
-51.4348042554539, -56.9132093579117, -53.527642322397, -49.7620292214747,
-54.6821412367706, -66.7962460110546, -52.0791798888695, -43.3022792658504,
-47.5584813904168, -36.3352478868053, -39.8699383685185, -43.9973042247199,
-49.3191665577514, -42.0818922168797, -37.7538461067954, -29.1591142899914,
-31.6815992654018, -35.3664789321372, -29.6435427630652, -45.5528322348158,
-37.0568327299924, -29.6739001502498, -37.0952936191428, -44.1786405275305,
-50.929131558954, -31.7842698176079, -31.4300485665082, -33.960404707688,
-34.0566040705914, -41.2299273666286, -30.1094672132779, -28.6802701495622,
-37.1973277887207, -31.7114680610898, -32.5450840790921, -28.5823680785893,
-27.5268500574853, -15.2389866754792, -19.2079199191329, -28.9156878395334,
-16.5863741697772, -31.6638747515138, -34.679018047114, -32.6358481677933,
-26.3463300811612, -18.542719903123), `Trace 3` = c(4.74984904312473,
-6.83237755613888, -4.15774846489683, 0.0116753456567835, 4.3974208810568,
8.56175743226069, -0.271281722577697, -10.7982854290066, -18.31704442037,
-15.7577103721081, -20.5775487342614, -17.7307614062074, -14.2844531791322,
-5.43267691733291, 2.52755064598145, -0.79977817636393, -8.07074631773528,
-14.6631228094247, -9.70657043283029, -11.4521183354252, -10.8401698276907,
-5495.45466682125, -4324.53856178012, -3525.03574657791, -2774.37269062517,
-2175.8494069729, -1790.54797875842, -1574.71991002551, -1342.90235937345,
-1212.59715782746, -1042.56659527622, -1006.18885759924, -962.27473179716,
-870.459562514915, -847.89784200018, -770.205392585522, -709.279500982242,
-740.484104629636, -739.054108223511, -645.039948927494, -712.347389757369,
-609.734365947307, -613.120930696929, -630.805982834916, -581.828460576409,
-608.843958294059, -602.432567890874, -547.023947351376, -571.475614300591,
-561.707380041648, -535.094375334464, -578.783728464712, -535.290908514374,
-489.922390143035, -522.824368605682, -520.322259788742, -556.271028784585,
-536.474251127913, -546.811709881227, -541.304029428261, -563.702125503968,
-460.326259578172, -348.718859066443, -261.740363110507, -244.084411205067,
-182.533320181224, -205.356578064485, -157.759947570376, -162.214202634405,
-180.011654146528, -176.904445787135, -167.116794266109, -163.416234638164,
-155.821745831568, -134.760994564946, -131.702791057298, -138.598664148971,
-139.818370538306, -134.700400696581, -137.275258643317, -119.921721377143,
-118.187525264885, -118.490007264421, -130.391338033262, -138.05114734155,
-127.505366899025, -132.636233878671, -123.490111075107, -113.42942794286,
-122.40925776411, -114.48254277334, -122.78054774327, -90.9528981496313,
-96.9508488566491, -107.842237007564, -91.0521871208113, -91.0347011279681,
-85.7054147126896, -89.7363815316723, -77.6588521980595, -76.6733051688234,
-85.821987540449, -90.3216600489126, -66.1137192454051, -77.7157754909198,
-89.8637060331546, -80.9149315468257, -71.7434481475478, -97.6600776026528,
-103.405900069071, -83.7502802699966, -77.4600968679799, -77.8705250264031,
-78.9012879762878, -87.4698127883497, -92.9587198547098, -96.1222986385502,
-91.1990314226718, -83.8744116889207, -61.7720026226848, -83.6616594930646,
-91.3899042204887, -74.2552104995002, -94.3117384183545, -81.130091800586,
-87.6638514042855, -79.061763018934, -78.7472359255489, -72.9642062301352,
-83.5759889935287, -74.066505526926, -62.6191749912397, -75.7150349466975,
-71.8704211546101, -68.4798935028027, -77.0470926055507, -76.6024078920054,
-66.5760393943856, -77.8848130194484, -77.5151449198185, -65.5482413040489,
-47.6087884294611, -35.6865291924552, -47.9648700291328, -62.8176093048552,
-48.969044800301, -46.853228499419, -52.562083189922, -58.7677963803543,
-63.6615259259388, -51.7351340481719, -54.5967510836755, -54.1294816023731,
-47.7621427567758, -40.9244974392914, -50.5286026229961, -45.9961132210891,
-43.143208905187, -43.8395623054062, -49.3326618452772, -48.308625153823,
-44.9833219970479, -32.4206723427767, -45.6628898472981, -41.4748918817457,
-43.6438737242104, -42.9844450147366, -30.3729810016378, -44.9519080631137,
-45.8241111308495, -40.4766896430523, -40.3007872752484, -46.4770136239361,
-49.3759491415156, -46.0844075639024, -34.3090862431636, -26.6047381016158,
-28.9119815377167, -33.1619464253006, -37.3813739690468, -46.5001186141503,
-54.5235621985407, -44.5233400090119, -55.2272273265567, -48.088333647706,
-55.3522589332341, -52.8146474401922, -60.1877313269088, -48.2512741329643,
-34.8540879147507, -55.2019332852645, -50.8488894007021, -49.9600753927381,
-48.5654335180739, -47.8918651630979, -45.1405419376454, -40.8504490169926,
-38.5815843253789, -45.001677748311, -43.0547862406721)), .Names = c("Time",
"Trace 1", "Trace 2", "Trace 3"), row.names = c(1000L, 2000L,
3000L, 4000L, 5000L, 6000L, 7000L, 8000L, 9000L, 10000L, 11000L,
12000L, 13000L, 14000L, 15000L, 16000L, 17000L, 18000L, 19000L,
20000L, 21000L, 22000L, 23000L, 24000L, 25000L, 26000L, 27000L,
28000L, 29000L, 30000L, 31000L, 32000L, 33000L, 34000L, 35000L,
36000L, 37000L, 38000L, 39000L, 40000L, 41000L, 42000L, 43000L,
44000L, 45000L, 46000L, 47000L, 48000L, 49000L, 50000L, 51000L,
52000L, 53000L, 54000L, 55000L, 56000L, 57000L, 58000L, 59000L,
60000L, 61000L, 62000L, 63000L, 64000L, 65000L, 66000L, 67000L,
68000L, 69000L, 70000L, 71000L, 72000L, 73000L, 74000L, 75000L,
76000L, 77000L, 78000L, 79000L, 80000L, 81000L, 82000L, 83000L,
84000L, 85000L, 86000L, 87000L, 88000L, 89000L, 90000L, 91000L,
92000L, 93000L, 94000L, 95000L, 96000L, 97000L, 98000L, 99000L,
100000L, 101000L, 102000L, 103000L, 104000L, 105000L, 106000L,
107000L, 108000L, 109000L, 110000L, 111000L, 112000L, 113000L,
114000L, 115000L, 116000L, 117000L, 118000L, 119000L, 120000L,
121000L, 122000L, 123000L, 124000L, 125000L, 126000L, 127000L,
128000L, 129000L, 130000L, 131000L, 132000L, 133000L, 134000L,
135000L, 136000L, 137000L, 138000L, 139000L, 140000L, 141000L,
142000L, 143000L, 144000L, 145000L, 146000L, 147000L, 148000L,
149000L, 150000L, 151000L, 152000L, 153000L, 154000L, 155000L,
156000L, 157000L, 158000L, 159000L, 160000L, 161000L, 162000L,
163000L, 164000L, 165000L, 166000L, 167000L, 168000L, 169000L,
170000L, 171000L, 172000L, 173000L, 174000L, 175000L, 176000L,
177000L, 178000L, 179000L, 180000L, 181000L, 182000L, 183000L,
184000L, 185000L, 186000L, 187000L, 188000L, 189000L, 190000L,
191000L, 192000L, 193000L, 194000L, 195000L, 196000L, 197000L,
198000L, 199000L, 200000L), class = "data.frame")
If you
plot(stackover_data$Time,stackover_data$'Trace 1',type='l'
you can see from time = 2 is where the peak is and I'm looking to fit it from 2 seconds to 6 seconds in ggplot. ( yes I know I used base graphics for the example, its just easier to plot one graph in that vs ggplot2.
Thanks all!
library(ggplot)
# rename the variables, so there's no space in them (is easier in aes())
names(neurons)[2:4] <- paste0('Trace', 1:3)
Now we make a plot, where we use a selection of the data based on the lowest point in the trace:
ggplot(neurons, aes(x = Time, y = Trace1)) +
geom_line() +
geom_smooth(data = subset(neurons, Time >= Time[which.min(Trace1)] &
Time < Time[which.min(Trace1)] + 4)) +
theme_classic() +
xlim(0, 10)
Results in:
Note that the ggplot equivalent of your simple base plot is this:
qplot(neurons$Time, neurons$Trace1, geom = 'line')
Basically, just as easy ;)

Resources