{"action":"created","issue":{"url":"https://api.github.com/repos/mareframe/mfdb/issues/15","labels_url":"https://api.github.com/repos/mareframe/mfdb/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/mareframe/mfdb/issues/15/comments","events_url":"https://api.github.com/repos/mareframe/mfdb/issues/15/events","html_url":"https://github.com/mareframe/mfdb/issues/15","id":103677510,"number":15,"title":"Index abundance by age","user":{"login":"vbartolino","id":9845667,"avatar_url":"https://avatars.githubusercontent.com/u/9845667?v=3","gravatar_id":"","url":"https://api.github.com/users/vbartolino","html_url":"https://github.com/vbartolino","followers_url":"https://api.github.com/users/vbartolino/followers","following_url":"https://api.github.com/users/vbartolino/following{/other_user}","gists_url":"https://api.github.com/users/vbartolino/gists{/gist_id}","starred_url":"https://api.github.com/users/vbartolino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vbartolino/subscriptions","organizations_url":"https://api.github.com/users/vbartolino/orgs","repos_url":"https://api.github.com/users/vbartolino/repos","events_url":"https://api.github.com/users/vbartolino/events{/privacy}","received_events_url":"https://api.github.com/users/vbartolino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-28T09:03:04Z","updated_at":"2015-11-11T17:36:28Z","closed_at":null,"body":"Many survey datasets (ie, bottom trawl survey from DATRAS) have length distribution and individual fish biological data on different tables, such as tables HL and CA in DATRAS.\r\nHL contains the abundance by length for the entire haul\r\nCA contains length, age, maturity, etc. of individual fish often from a subsample\r\n\r\nTo calculate indices of abundance by age it is necessary to link info from these two tables. Usually an age-length-key from CA is used to split the lengths in HL...\r\n\r\nCan this be done with a single query in mfdb?"},"comment":{"url":"https://api.github.com/repos/mareframe/mfdb/issues/comments/155856616","html_url":"https://github.com/mareframe/mfdb/issues/15#issuecomment-155856616","issue_url":"https://api.github.com/repos/mareframe/mfdb/issues/15","id":155856616,"user":{"login":"lentinj","id":586911,"avatar_url":"https://avatars.githubusercontent.com/u/586911?v=3","gravatar_id":"","url":"https://api.github.com/users/lentinj","html_url":"https://github.com/lentinj","followers_url":"https://api.github.com/users/lentinj/followers","following_url":"https://api.github.com/users/lentinj/following{/other_user}","gists_url":"https://api.github.com/users/lentinj/gists{/gist_id}","starred_url":"https://api.github.com/users/lentinj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lentinj/subscriptions","organizations_url":"https://api.github.com/users/lentinj/orgs","repos_url":"https://api.github.com/users/lentinj/repos","events_url":"https://api.github.com/users/lentinj/events{/privacy}","received_events_url":"https://api.github.com/users/lentinj/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T17:36:28Z","updated_at":"2015-11-11T17:36:28Z","body":"Looking at this again, doing (3) and (4) should be really easy just in R. Essentially you need something like:-\r\n\r\n```\r\nattr((outcome of 2), 'age') <- list(age = age, ...)\r\n```\r\n\r\nIf you still need to do this, do you want to have a look at the code next week?"}}