Hi all,
I have a dataframe of the following type: Day Place dendrometer max 1 1 1 4684 2 1 1 4831 .. 1 1 2 2486 2 1 2 2596 . 1 2 1 6987 2 2 1 6824 I need the first element of each dendrometer as NA, so every time R calculates "max" for a new dendrometer (independently of the place), starts with NA, like this: Day Place dendrometer max 1 1 1 NA 2 1 1 4831 .. 1 1 2 NA 2 1 2 2596 . 1 2 1 NA 2 2 1 6824 Could you also let me know I could calculate MEAN of the max column for each dendrometer within each ring (sapply, aggregate?) instead of calculating mean for the entire max column? Thanks! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.