Thanks for help and attention

I have a data.frame "sample" in shape-file like this

ID; pH
1;3.4
1;3.8
1;3.9
4;5.5
4;5.9
4;5.8
5;7.1
5;7.5
5;7.6
5;7.7
5;7.8
5;7.9

I wish to extract the max(pH) of ID = 1, after max(pH) of ID = 2, etc. etc.

I tryed the code

sample <- readOGR(".", "sample")
max(sample$pH) #to obtain the max of pH
max(sample$ph[c(1), ] #not run

thanks
Gianni

	[[alternative HTML version deleted]]

