I am trying to change the index of my database. They have the same name, what changes is their number (dataset_id_1, dataset_id_2, ...., dataset_id_76). The datasets are in dataframe format and have 8 columns each.
I would like to change the current index of each (288 rows) into 740 to 1027.
I tried the following with no success:
range = c(740:1027)
for (i in 1:76) {
rownames(dataset_id_[[i]]) = range
}
Do you know how to solve the problem?
question from:https://stackoverflow.com/questions/65671981/change-the-rownames-of-each-dataset-in-a-loop-in-r