Data wrangling and creating an new function on ragged data

I am working with 45 large dataframes of 60 each of extremely, messy timeseries data. But it basically boils down to the two data frames below. I have managed to sort wrangle it down to these two dataframe types, the first is the positions on the y-axis

Group1  Group2   Group3            
0         0        0                
1         1        1
3         2        4
5         3        7
          5        8

names   samples   t0  XIncrement
Group1    4       0      2   
Group2    5       1      2
Group3    7       2      3

I have to create the time for each group. When I write the function for a single group it works great, I get exactly what I want.
1.) t0 is the starting time
2.) xincrement is the time between each sample taken
3.) sample is the number of samples in the set.
4.) Time would be the time for each sample taken

    Time_function <- function(samples, t0, XIncrement) {
      samples_2 <-c(1:samples)
      Time <- ((samples_2* t0) +XIncrement)
test_function <- Time_function(100, 200e-9, 500e-12)

I need it to be "applied" each group. I really am not sure how to either create a new data frame with the information or add it to the rows of the df.
I have tried making an empty data frame and populating it that way and that did not work.

When I transpose the data and get it into list form it, it seems the most usable form. However, I still cannot get the create Time into the list.

Added For greater clarity: Each Group has it own unique time some groups were sampled more than others.

So, at the end I need to merge Group_1 with Group1_Time, Group_2 with Group2_Time. The data frame will be ragged.

Thanks for any help or guidance you can provide. I have googled and search stackoverflow for information, but I come up empty-handed. If there is a question like this, great, I have yet to find it.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.