I have many dataframes (139) each representing data from an animal. An exemple:
head(`88719.09`)
date.sec lon lat lon.025 lat.025 lon.5 lat.5 lon.975 lat.975 bmode
1 -61860758400 -38.7792 -13.83299 -39.3 -14.56000 -38.8 -13.870 -38.1 -12.92975 1.467
2 -61860736800 -38.7865 -13.84709 -39.3 -14.49000 -38.8 -13.880 -38.2 -13.08000 1.682
3 -61860715200 -38.7511 -13.87840 -39.1 -14.40000 -38.7 -13.860 -38.4 -13.44000 1.735
4 -61860693600 -38.8559 -14.13090 -39.0 -14.27000 -38.9 -14.130 -38.8 -14.01000 1.675
5 -61860672000 -39.0026 -14.35851 -39.3 -14.68025 -39.0 -14.365 -38.7 -14.00000 1.875
6 -61860650400 -38.9631 -14.22969 -39.3 -14.62000 -38.9 -14.220 -38.6 -13.84975 1.870
bmode.5
1 1
2 2
3 2
4 2
5 2
6 2
However, within each dataframe there is no column specifying which animal it is.
In the example case, an ID
column was required filled with "88719.09", like so:
teste$ID <- 88719.09
> head(teste)
date.sec lon lat lon.025 lat.025 lon.5 lat.5 lon.975 lat.975 bmode
1 -61860758400 -38.7792 -13.83299 -39.3 -14.56000 -38.8 -13.870 -38.1 -12.92975 1.467
2 -61860736800 -38.7865 -13.84709 -39.3 -14.49000 -38.8 -13.880 -38.2 -13.08000 1.682
3 -61860715200 -38.7511 -13.87840 -39.1 -14.40000 -38.7 -13.860 -38.4 -13.44000 1.735
4 -61860693600 -38.8559 -14.13090 -39.0 -14.27000 -38.9 -14.130 -38.8 -14.01000 1.675
5 -61860672000 -39.0026 -14.35851 -39.3 -14.68025 -39.0 -14.365 -38.7 -14.00000 1.875
6 -61860650400 -38.9631 -14.22969 -39.3 -14.62000 -38.9 -14.220 -38.6 -13.84975 1.870
bmode.5 ID
1 1 88719.09
2 2 88719.09
3 2 88719.09
4 2 88719.09
5 2 88719.09
6 2 88719.09
I joined all dataframes together, but I don't know what data is for which animal. I would like to create a column with the IDs for each object before joining them into a single dataframe. I would like to do this in an efficient way, instead of creating one column at a time for each of the 139 data frames.
Names of dataframes (objects)
ls()
102211.10,10946.05,111868.11,111868.16,111869.11,111869.17,111870.17,111871.12,112694.12,112696.17,112702.12,112712.12,112714.12,112717.12,112728.17,120937.17,120938.16,120942.17,120943.17,120947.12,120947.17,121189.12,121191.17,121192.12,121193.12,121195.12,121196.12,121203.17,121206.17,123226.17,171994.17,171997.17,172000.17,172001.17,172002.17,172003.17,172004.17,194591.19,194593.19,194601.19,194603.19,20162.03,20687.03,21791.03,21792.03,21800.03,21809.03,21810.03,24640.03,24641.05,24642.03,26712.05,27258.05,27259.03,27259.05,27259.06,27261.03,27261.05,27261.07,33000.05,33000.06,33001.05,33001.06,37229.05,37229.06,37230.06,37231.05,37231.07,37234.05,37234.06,37236.06,37282.06,37286.07,37288.06,37288.07,42521.06,42521.07,42525.07,50682.06,50682.07,50686.07,50687.07,60004.07,60007.07,7617.05,7618.05,81122.09,81123.09,81124.09,81125.09,81126.09,84480.12,84484.17,84485.17,84497.10,87624.10,87631.10,87632.12,87635.17,87759.08,87760.08,87761.08,87762.08,87763.08,87764.08,87765.08,87766.08,87767.08,87768.08,87768.11,87769.08,87769.11,87770.08,87771.09,87773.08,87773.09,87773.10,87773.11,87774.08,87774.09,87774.11,87775.08,87775.12,87776.08,87776.11,87776.17,87777.08,87777.10,87777.17,87778.08,87778.10,87780.17,87781.10,87783.09,87783.11,88719.09,88720.09,88724.10,88726.10,88727.09,96380.10
Can anybody help me? Thank you!