I am relatively new to R and I would like to know how can I create a variable (number sequence) that identifies the each of the original data.frames before being joined with
You can use
transform(dat, newCol = cumsum(ID == 1))
where dat is the name of your data frame and ID is the name of the ID column.
dat
ID