I have a list with 149 elements. Each element of this list is a list. Each of this list has a dataframe. Each datframe has 11 colunms. Each colunm has 366 values. How do I keep these variables and their structure erasing only the last 336 value?
I have tried to associate NULL value to the last value but I have got an error message
for (i in 1:149){
for (j in 1:11){
x[[i]][[1]][[j]][[366]] <- NULL
}
}
I expect it would work but it did not: Error in x[[...]] <- m : replacement has length zero