I have two equal lists of "10" dataframes each (nrows of these 10 dataframes is varying): in one are values ("list.n") and in another corresponding Dates ("list.perc"), each column represents one station (the same stations are in all 10 dataframes of a list); NA values are in the end of columns. I am searching for the maximum value of a given column over a list. Even if I use
sapply(list.n,FUN=function(x)apply(x,MARGIN=2,
FUN=max,na.rm=T,arr.ind=T)),
I obtain a dataframe of maxima for each column but for each object of a list and not of all the list and without the index number (the position). I would like to preserve the index because I want use it for searching exactly the same position in another list of the same length (only values are different). The result may be one value per column across all the list.n. Can someone help me? Thanks a lot!