plot - Find the average of one variable in multiple year classes in R -


i have 50 year-classes, , age , length data on individuals within each year class. without inputting different data set each year class i'm trying plot average age each year class.

as in year class along x axis , average age (or length) (for each year class) along y.

this data frame

'data.frame':   236628 obs. of  7 variables:  $ maturity: ord.factor w/ 2 levels "0"<"1": 1 1 1 1 1 1 1 1 1 1 ...  $ year    : factor w/ 50 levels "1966","1967",..: 1 1 1 1 1 1 1 1 1 1 ...  $ quarter : factor w/ 4 levels "1","2","3","4": 1 1 1 1 1 1 1 1 1 1 ...  $ area    : factor w/ 10 levels "1","2","3","4",..: 2 2 2 2 2 2 2 2 2 2 ...  $ lngth   : int  145 145 145 150 150 150 150 150 155 155 ...  $ age     : int  1 1 1 1 1 1 1 1 1 1 ...  $ sex     : ord.factor w/ 2 levels "0"<"1": 1 2 2 2 2 2 2 2 1 2 ... 

cheers


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -