I am having a problem updating the values in a list of dataframe. My data is a large collection of different samples...so I split the dataframe according to samples and stored them in a list. I have created the necesarry columns by assigning the NA variable and then put it in a loop:
for (part in 1:2){
for(i in 1:length(stepss)){
idx<-stepss[i]:(stepss[i]+ss-1)
info_samples[[part]]$TIMESTAMP[i]<-mean(info_samples_orig[[part]]$TIMESTAMP[idx], na.rm=T)
however, I still keep on getting the same error, where the replacement row has one extra row than the data row. I have tried all sorts of debugging, but can't seem to figure out the problem.
I used the split function to seperate a large dataframe according to participant/sample names, and then updating each dataframe by running a for loop. I expect all the values to be updated, however I keep getting the error that the number of replacement rows has more than the number of data rows. My R version is 4.3.1