I have 7 data frames called:
"muestra_suplentes_103"
"muestra suplentes_108"
"muestra_suplentes_109"
"muestra_suplentes_113"
"muestra_suplentes_114"
"muestra_suplentes_138"
"muestra suplentes_139"
I also have a vector called:
cod_jer_groups= 103 108 109 113 114 138 139
I need to do this for this data frame:
muestra_suplentes_103$nrow=seq(from = 1, to = nrow(muestra_suplentes_103), by = 1)
muestra_suplentes_108$nrow=seq(from = 1, to = nrow(muestra_suplentes_108), by = 1)
muestra_suplentes_109$nrow=seq(from = 1, to = nrow(muestra_suplentes_109), by = 1)
muestra_suplentes_113$nrow=seq(from = 1, to = nrow(muestra_suplentes_113), by = 1)
muestra_suplentes_114$nrow=seq(from = 1, to = nrow(muestra_suplentes_114), by = 1)
muestra_suplentes_138$nrow=seq(from = 1, to = nrow(muestra_suplentes_138), by = 1)
muestra_suplentes_139$nrow=seq(from = 1, to = nrow(muestra_suplentes_139), by = 1)
I am traying to do this:
for(i in cod_jer_groups){
muestra_suplentes$nrow= seq(from = 1, to = nrow(muestra_suplentes_i, by = 1))
names(muestra_suplentes)[length(names(muestra_suplentes))]="nrow"
}
I know that is wrong call "muestra_suplentes_i" but i dont know how to do it.
any suugestion?
thanks!