Re: [R] average X value of specific Y

2012-12-17 Thread Greg Snow
Look at the tapply function. Possibly using round or cut if needed. Other tools that may be useful (but probably overkill for the simple problem) include aggregate, ave, and the plyr package. On Sat, Dec 15, 2012 at 9:12 PM, Elaine Kuo elaine.kuo...@gmail.com wrote: Hello I have a table

[R] average X value of specific Y

2012-12-15 Thread Elaine Kuo
Hello I have a table describing butterfly range traits. It is composed of three columns as below Species name range size (X)latitude of range midpoint (Y) There are 11 kinds of butterflies. Each has its range size, and the latitude of each range midpoint ranges from 9 to 19. I