I am stuck with the beginning of my analysis. Perhaps the question could be stupid, but I would like to request your help for some tips. I have a dataframe with several variables; and each variable has 10 observations. My doubt is how can I estimate for each variable the max of the first 5 observations, and the max of the following 5 observations.
This is an example of my code:
for (i in 1:length(ncols)){
max.value <- max(var1)
}
Thank you very much in advance