{"action":"created","issue":{"url":"https://api.github.com/repos/STAT540-UBC/Discussion/issues/38","labels_url":"https://api.github.com/repos/STAT540-UBC/Discussion/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/STAT540-UBC/Discussion/issues/38/comments","events_url":"https://api.github.com/repos/STAT540-UBC/Discussion/issues/38/events","html_url":"https://github.com/STAT540-UBC/Discussion/issues/38","id":57659103,"number":38,"title":"Seminar 04b - Can't get the right answer in a pipe?","user":{"login":"tshalev","id":8867070,"avatar_url":"https://avatars.githubusercontent.com/u/8867070?v=3","gravatar_id":"","url":"https://api.github.com/users/tshalev","html_url":"https://github.com/tshalev","followers_url":"https://api.github.com/users/tshalev/followers","following_url":"https://api.github.com/users/tshalev/following{/other_user}","gists_url":"https://api.github.com/users/tshalev/gists{/gist_id}","starred_url":"https://api.github.com/users/tshalev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tshalev/subscriptions","organizations_url":"https://api.github.com/users/tshalev/orgs","repos_url":"https://api.github.com/users/tshalev/repos","events_url":"https://api.github.com/users/tshalev/events{/privacy}","received_events_url":"https://api.github.com/users/tshalev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-13T21:53:26Z","updated_at":"2015-02-16T05:58:53Z","closed_at":null,"body":"Hi all,\r\nFor some reason when doing seminar 04b I can't seem to get the right answer using the dplyr pipe. I've attached the markdown file, if anyone know the answer it would be much appreciated. I've noticed that many people have gotten different answers for this question and most are wrong.\r\n\r\nThanks,\r\nTal\r\nhttps://github.com/STAT540-UBC/zz_shalev-tal_STAT540_2015/blob/master/Seminar%2004/Seminar_04b_assignment_Tal_RMD.md"},"comment":{"url":"https://api.github.com/repos/STAT540-UBC/Discussion/issues/comments/74463227","html_url":"https://github.com/STAT540-UBC/Discussion/issues/38#issuecomment-74463227","issue_url":"https://api.github.com/repos/STAT540-UBC/Discussion/issues/38","id":74463227,"user":{"login":"kmnip","id":5395502,"avatar_url":"https://avatars.githubusercontent.com/u/5395502?v=3","gravatar_id":"","url":"https://api.github.com/users/kmnip","html_url":"https://github.com/kmnip","followers_url":"https://api.github.com/users/kmnip/followers","following_url":"https://api.github.com/users/kmnip/following{/other_user}","gists_url":"https://api.github.com/users/kmnip/gists{/gist_id}","starred_url":"https://api.github.com/users/kmnip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmnip/subscriptions","organizations_url":"https://api.github.com/users/kmnip/orgs","repos_url":"https://api.github.com/users/kmnip/repos","events_url":"https://api.github.com/users/kmnip/events{/privacy}","received_events_url":"https://api.github.com/users/kmnip/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T05:58:53Z","updated_at":"2015-02-16T05:58:53Z","body":"Normalizing to Canada shouldn't change the answer.\r\n\r\nMax growth in **GDP per capita**: Kuwait between 1967~1972\r\nMax growth in **GDP**: China between 2002~2007\r\n\r\nThe question asks about GDP, not GDP per capita, ie.\r\n\r\n>Can you modify the code above to answer this questions: which country gains the most growth in GDP in a 5-year interval? Between which 2 years?\r\n\r\nSo, I think Tal's answer is correct.\r\n\r\nTal, I actually used 2 separate piped commands: first to select the country and the max delta GDP value, and second to select the years. Technically, the two could have been nested.\r\n\r\nKa Ming"}}