Error in aggregate.data.frame(as.data.frame(x), ...) :
no rows to aggregate"
"sega" and "obsa" correspond to Miller's "segdata" and "obsdata", respectively, and have the following structure:
"> str(sega)
'data.frame': 146 obs. of 8 variables:
$ code : int 1 2 3 4 5 6 7 8 9 10 ...
$ latitude : num 0.146 0.147 0.148 0.15 0.151 ...
$ longitude : num 6.58 6.58 6.58 6.58 6.57 ...
$ Effort : num 3 3 3 3 3 3 3 3 3 3 ...
$ Transect.Label: Factor w/ 5 levels "A","B","C","D",..: 1 1 1 1 1 1 1 1 1 1 ...
$ Sample.Label : Factor w/ 146 levels "a1","a10","a11",..: 1 8 9 10 11 12 13 14 15 2 ...
$ x : num -321 -433 -568 -720 -907 ...
$ y : num -302.4 -139.5 13.2 188.3 262.6 ...
> str(obsa)
'data.frame': 47 obs. of 6 variables:
$ code : int 1 2 3 4 5 6 7 8 9 10 ...
$ object : Factor w/ 46 levels "A131","A132",..: 15 18 19 20 16 17 21 22 23 33 ...
$ Sample.Label: Factor w/ 27 levels "ac10","ac16",..: 15 1 2 4 5 5 5 6 22 12 ...
$ size : num 2 1 1 1 2 3 1 1 2 1 ...
$ distance : num 0 11 0 15 0 22 10 23 5.5 5 ...
$ Effort : num 3 3 3 3 3 3 3 3 3 3 ..."
I wonder if this might have anything to do with the fact that I have multiple observations for the same segment (hence "obsa$Sample.Label" has only 27 levels instead of 47 ), or if that might in any other way create problems in the analysis.
Any help in how I might sort out this error would be greatly appreciated.
Best regards,
RICARDO.