I\'m pretty new to R and have a question regarding selecting the max values in a column.
I have the following data frame:
X Y [1,]
You can use ave with a custom function that wraps max, so you can remove NA values:
ave
max
NA
Data$Y <- ave(Data$Y, Data$X, FUN=function(x) max(x, na.rm=TRUE))