{"action":"created","comment":{"url":"https://api.github.com/repos/PecanProject/pecan/pulls/comments/139022092","pull_request_review_id":62893725,"id":139022092,"diff_hunk":"@@ -0,0 +1,66 @@\n+#' @title check_if_legal_table\n+#' @details\n+#' Checks if custom_table:\n+#' 1. is formated correctly\n+#' 2. is complete (has all of the species/pft's in both observations)\n+#' 3. is condense-able (Could be represented as a hierachry)\n+#' \n+#' @param observation_one a vector of plant fucntional types, or species\n+#' @param observation_two anouther vector of plant fucntional types, or species\n+#' @param custom_table a table that either maps two pft's to one anouther or maps custom species codes to bety id codes. \n+#' In the second case, must be passable to match_species_id. \n+#' @return \\code{boolean} \n+#' @author Tempest McCabe\n+check_if_legal_table<-function(table, observation_one, observation_two){\n+  all_there<-TRUE\n+  names<-names(table)\n+  if(!\"plant_functional_type_one\" %in% names|!\"plant_functional_type_two\" %in% names ){\n+    logger.severe(\"Custom table provided does not use correct column names. Requires both 'plant_fucntional_type_one', and 'plant_fucntional_type_two'. \n+                  Column names are currently\", names(table))\n+  }else{\n+    missing<-list()\n+    for(h in 1:length(observation_one)){\n+      if(!observation_one[h] %in% table$plant_functional_type_one){all_there<-FALSE; missing<-c(missing,observation_one[h])}","path":"modules/benchmark/R/check_if_legal_table.R","position":23,"original_position":23,"commit_id":"79894b0012bb2c76d45c5bfa80a50de6228a0b76","original_commit_id":"79894b0012bb2c76d45c5bfa80a50de6228a0b76","user":{"login":"ashiklom","id":5680221,"avatar_url":"https://avatars0.githubusercontent.com/u/5680221?v=4","gravatar_id":"","url":"https://api.github.com/users/ashiklom","html_url":"https://github.com/ashiklom","followers_url":"https://api.github.com/users/ashiklom/followers","following_url":"https://api.github.com/users/ashiklom/following{/other_user}","gists_url":"https://api.github.com/users/ashiklom/gists{/gist_id}","starred_url":"https://api.github.com/users/ashiklom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashiklom/subscriptions","organizations_url":"https://api.github.com/users/ashiklom/orgs","repos_url":"https://api.github.com/users/ashiklom/repos","events_url":"https://api.github.com/users/ashiklom/events{/privacy}","received_events_url":"https://api.github.com/users/ashiklom/received_events","type":"User","site_admin":false},"body":"Again, extend this out into a block. As a general rule, you should almost always avoid putting multiple statements on the same line (i.e. use semicolons like this).","created_at":"2017-09-14T22:01:56Z","updated_at":"2017-09-14T22:09:18Z","html_url":"https://github.com/PecanProject/pecan/pull/1662#discussion_r139022092","pull_request_url":"https://api.github.com/repos/PecanProject/pecan/pulls/1662","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/PecanProject/pecan/pulls/comments/139022092"},"html":{"href":"https://github.com/PecanProject/pecan/pull/1662#discussion_r139022092"},"pull_request":{"href":"https://api.github.com/repos/PecanProject/pecan/pulls/1662"}}},"pull_request":{"url":"https://api.github.com/repos/PecanProject/pecan/pulls/1662","id":141155994,"html_url":"https://github.com/PecanProject/pecan/pull/1662","diff_url":"https://github.com/PecanProject/pecan/pull/1662.diff","patch_url":"https://github.com/PecanProject/pecan/pull/1662.patch","issue_url":"https://api.github.com/repos/PecanProject/pecan/issues/1662","number":1662,"state":"open","locked":false,"title":"Align_pft","user":{"login":"mccabete","id":21266199,"avatar_url":"https://avatars2.githubusercontent.com/u/21266199?v=4","gravatar_id":"","url":"https://api.github.com/users/mccabete","html_url":"https://github.com/mccabete","followers_url":"https://api.github.com/users/mccabete/followers","following_url":"https://api.github.com/users/mccabete/following{/other_user}","gists_url":"https://api.github.com/users/mccabete/gists{/gist_id}","starred_url":"https://api.github.com/users/mccabete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mccabete/subscriptions","organizations_url":"https://api.github.com/users/mccabete/orgs","repos_url":"https://api.github.com/users/mccabete/repos","events_url":"https://api.github.com/users/mccabete/events{/privacy}","received_events_url":"https://api.github.com/users/mccabete/received_events","type":"User","site_admin":false},"body":"Align_pft is a function that is useful for  comparing either data or models that use different plant functional types. This function is a wrapper for a group of functions that handle data-to-data comparisons, data-to-model comparisons, and model-to-model comparisons.  This PR is just data-to-data. \r\n\r\n## Description\r\nThis is designed to be used after load_data(), and query_format_vars. \r\n\r\n## Motivation and Context\r\nThis should be a useful change for plotting and visualization, as well as putting everything in the same format for benchmarking. Right now, it's heavily reliant on the user providing a custom_table that related on PFT to another.  Down the line, it might be worth investing in: \r\n\r\n- How that table would enter the workflow\r\n\r\n- If it's worth making way for users to associate bety pft's with inputs. \r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [ ] Bug fix (non-breaking change which fixes an issue) <!-- please add issue number -->\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My change requires a change to the documentation.\r\n- [x] I have updated the CHANGELOG.md.\r\n- [ ] I have updated the documentation accordingly. (I will update the benchmarking documentation when a first draft exist. Right now the function is extensively documented internally) \r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [ ] I have added tests to cover my changes.\r\n- [ ] All new and existing tests passed.\r\n\r\n<!--this template is from https://www.talater.com/open-source-templates/#/page/99--> \r\n","created_at":"2017-09-14T19:20:31Z","updated_at":"2017-09-14T22:09:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e977a9321ced4783e7b991c4fa9829451e9488e8","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/PecanProject/pecan/pulls/1662/commits","review_comments_url":"https://api.github.com/repos/PecanProject/pecan/pulls/1662/comments","review_comment_url":"https://api.github.com/repos/PecanProject/pecan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PecanProject/pecan/issues/1662/comments","statuses_url":"https://api.github.com/repos/PecanProject/pecan/statuses/79894b0012bb2c76d45c5bfa80a50de6228a0b76","head":{"label":"PecanProject:align_pft","ref":"align_pft","sha":"79894b0012bb2c76d45c5bfa80a50de6228a0b76","user":{"login":"PecanProject","id":2879854,"avatar_url":"https://avatars0.githubusercontent.com/u/2879854?v=4","gravatar_id":"","url":"https://api.github.com/users/PecanProject","html_url":"https://github.com/PecanProject","followers_url":"https://api.github.com/users/PecanProject/followers","following_url":"https://api.github.com/users/PecanProject/following{/other_user}","gists_url":"https://api.github.com/users/PecanProject/gists{/gist_id}","starred_url":"https://api.github.com/users/PecanProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PecanProject/subscriptions","organizations_url":"https://api.github.com/users/PecanProject/orgs","repos_url":"https://api.github.com/users/PecanProject/repos","events_url":"https://api.github.com/users/PecanProject/events{/privacy}","received_events_url":"https://api.github.com/users/PecanProject/received_events","type":"Organization","site_admin":false},"repo":{"id":6857384,"name":"pecan","full_name":"PecanProject/pecan","owner":{"login":"PecanProject","id":2879854,"avatar_url":"https://avatars0.githubusercontent.com/u/2879854?v=4","gravatar_id":"","url":"https://api.github.com/users/PecanProject","html_url":"https://github.com/PecanProject","followers_url":"https://api.github.com/users/PecanProject/followers","following_url":"https://api.github.com/users/PecanProject/following{/other_user}","gists_url":"https://api.github.com/users/PecanProject/gists{/gist_id}","starred_url":"https://api.github.com/users/PecanProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PecanProject/subscriptions","organizations_url":"https://api.github.com/users/PecanProject/orgs","repos_url":"https://api.github.com/users/PecanProject/repos","events_url":"https://api.github.com/users/PecanProject/events{/privacy}","received_events_url":"https://api.github.com/users/PecanProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PecanProject/pecan","description":"The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.","fork":false,"url":"https://api.github.com/repos/PecanProject/pecan","forks_url":"https://api.github.com/repos/PecanProject/pecan/forks","keys_url":"https://api.github.com/repos/PecanProject/pecan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PecanProject/pecan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PecanProject/pecan/teams","hooks_url":"https://api.github.com/repos/PecanProject/pecan/hooks","issue_events_url":"https://api.github.com/repos/PecanProject/pecan/issues/events{/number}","events_url":"https://api.github.com/repos/PecanProject/pecan/events","assignees_url":"https://api.github.com/repos/PecanProject/pecan/assignees{/user}","branches_url":"https://api.github.com/repos/PecanProject/pecan/branches{/branch}","tags_url":"https://api.github.com/repos/PecanProject/pecan/tags","blobs_url":"https://api.github.com/repos/PecanProject/pecan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PecanProject/pecan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PecanProject/pecan/git/refs{/sha}","trees_url":"https://api.github.com/repos/PecanProject/pecan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PecanProject/pecan/statuses/{sha}","languages_url":"https://api.github.com/repos/PecanProject/pecan/languages","stargazers_url":"https://api.github.com/repos/PecanProject/pecan/stargazers","contributors_url":"https://api.github.com/repos/PecanProject/pecan/contributors","subscribers_url":"https://api.github.com/repos/PecanProject/pecan/subscribers","subscription_url":"https://api.github.com/repos/PecanProject/pecan/subscription","commits_url":"https://api.github.com/repos/PecanProject/pecan/commits{/sha}","git_commits_url":"https://api.github.com/repos/PecanProject/pecan/git/commits{/sha}","comments_url":"https://api.github.com/repos/PecanProject/pecan/comments{/number}","issue_comment_url":"https://api.github.com/repos/PecanProject/pecan/issues/comments{/number}","contents_url":"https://api.github.com/repos/PecanProject/pecan/contents/{+path}","compare_url":"https://api.github.com/repos/PecanProject/pecan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PecanProject/pecan/merges","archive_url":"https://api.github.com/repos/PecanProject/pecan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PecanProject/pecan/downloads","issues_url":"https://api.github.com/repos/PecanProject/pecan/issues{/number}","pulls_url":"https://api.github.com/repos/PecanProject/pecan/pulls{/number}","milestones_url":"https://api.github.com/repos/PecanProject/pecan/milestones{/number}","notifications_url":"https://api.github.com/repos/PecanProject/pecan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PecanProject/pecan/labels{/name}","releases_url":"https://api.github.com/repos/PecanProject/pecan/releases{/id}","deployments_url":"https://api.github.com/repos/PecanProject/pecan/deployments","created_at":"2012-11-25T23:48:26Z","updated_at":"2017-09-06T16:55:02Z","pushed_at":"2017-09-14T22:08:18Z","git_url":"git://github.com/PecanProject/pecan.git","ssh_url":"git@github.com:PecanProject/pecan.git","clone_url":"https://github.com/PecanProject/pecan.git","svn_url":"https://github.com/PecanProject/pecan","homepage":"www.pecanproject.org","size":131348,"stargazers_count":66,"watchers_count":66,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":301,"forks":100,"open_issues":301,"watchers":66,"default_branch":"develop"}},"base":{"label":"PecanProject:develop","ref":"develop","sha":"308a93eae96322f4bf2b0440961f05b56451464b","user":{"login":"PecanProject","id":2879854,"avatar_url":"https://avatars0.githubusercontent.com/u/2879854?v=4","gravatar_id":"","url":"https://api.github.com/users/PecanProject","html_url":"https://github.com/PecanProject","followers_url":"https://api.github.com/users/PecanProject/followers","following_url":"https://api.github.com/users/PecanProject/following{/other_user}","gists_url":"https://api.github.com/users/PecanProject/gists{/gist_id}","starred_url":"https://api.github.com/users/PecanProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PecanProject/subscriptions","organizations_url":"https://api.github.com/users/PecanProject/orgs","repos_url":"https://api.github.com/users/PecanProject/repos","events_url":"https://api.github.com/users/PecanProject/events{/privacy}","received_events_url":"https://api.github.com/users/PecanProject/received_events","type":"Organization","site_admin":false},"repo":{"id":6857384,"name":"pecan","full_name":"PecanProject/pecan","owner":{"login":"PecanProject","id":2879854,"avatar_url":"https://avatars0.githubusercontent.com/u/2879854?v=4","gravatar_id":"","url":"https://api.github.com/users/PecanProject","html_url":"https://github.com/PecanProject","followers_url":"https://api.github.com/users/PecanProject/followers","following_url":"https://api.github.com/users/PecanProject/following{/other_user}","gists_url":"https://api.github.com/users/PecanProject/gists{/gist_id}","starred_url":"https://api.github.com/users/PecanProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PecanProject/subscriptions","organizations_url":"https://api.github.com/users/PecanProject/orgs","repos_url":"https://api.github.com/users/PecanProject/repos","events_url":"https://api.github.com/users/PecanProject/events{/privacy}","received_events_url":"https://api.github.com/users/PecanProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PecanProject/pecan","description":"The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.","fork":false,"url":"https://api.github.com/repos/PecanProject/pecan","forks_url":"https://api.github.com/repos/PecanProject/pecan/forks","keys_url":"https://api.github.com/repos/PecanProject/pecan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PecanProject/pecan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PecanProject/pecan/teams","hooks_url":"https://api.github.com/repos/PecanProject/pecan/hooks","issue_events_url":"https://api.github.com/repos/PecanProject/pecan/issues/events{/number}","events_url":"https://api.github.com/repos/PecanProject/pecan/events","assignees_url":"https://api.github.com/repos/PecanProject/pecan/assignees{/user}","branches_url":"https://api.github.com/repos/PecanProject/pecan/branches{/branch}","tags_url":"https://api.github.com/repos/PecanProject/pecan/tags","blobs_url":"https://api.github.com/repos/PecanProject/pecan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PecanProject/pecan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PecanProject/pecan/git/refs{/sha}","trees_url":"https://api.github.com/repos/PecanProject/pecan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PecanProject/pecan/statuses/{sha}","languages_url":"https://api.github.com/repos/PecanProject/pecan/languages","stargazers_url":"https://api.github.com/repos/PecanProject/pecan/stargazers","contributors_url":"https://api.github.com/repos/PecanProject/pecan/contributors","subscribers_url":"https://api.github.com/repos/PecanProject/pecan/subscribers","subscription_url":"https://api.github.com/repos/PecanProject/pecan/subscription","commits_url":"https://api.github.com/repos/PecanProject/pecan/commits{/sha}","git_commits_url":"https://api.github.com/repos/PecanProject/pecan/git/commits{/sha}","comments_url":"https://api.github.com/repos/PecanProject/pecan/comments{/number}","issue_comment_url":"https://api.github.com/repos/PecanProject/pecan/issues/comments{/number}","contents_url":"https://api.github.com/repos/PecanProject/pecan/contents/{+path}","compare_url":"https://api.github.com/repos/PecanProject/pecan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PecanProject/pecan/merges","archive_url":"https://api.github.com/repos/PecanProject/pecan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PecanProject/pecan/downloads","issues_url":"https://api.github.com/repos/PecanProject/pecan/issues{/number}","pulls_url":"https://api.github.com/repos/PecanProject/pecan/pulls{/number}","milestones_url":"https://api.github.com/repos/PecanProject/pecan/milestones{/number}","notifications_url":"https://api.github.com/repos/PecanProject/pecan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PecanProject/pecan/labels{/name}","releases_url":"https://api.github.com/repos/PecanProject/pecan/releases{/id}","deployments_url":"https://api.github.com/repos/PecanProject/pecan/deployments","created_at":"2012-11-25T23:48:26Z","updated_at":"2017-09-06T16:55:02Z","pushed_at":"2017-09-14T22:08:18Z","git_url":"git://github.com/PecanProject/pecan.git","ssh_url":"git@github.com:PecanProject/pecan.git","clone_url":"https://github.com/PecanProject/pecan.git","svn_url":"https://github.com/PecanProject/pecan","homepage":"www.pecanproject.org","size":131348,"stargazers_count":66,"watchers_count":66,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":301,"forks":100,"open_issues":301,"watchers":66,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PecanProject/pecan/pulls/1662"},"html":{"href":"https://github.com/PecanProject/pecan/pull/1662"},"issue":{"href":"https://api.github.com/repos/PecanProject/pecan/issues/1662"},"comments":{"href":"https://api.github.com/repos/PecanProject/pecan/issues/1662/comments"},"review_comments":{"href":"https://api.github.com/repos/PecanProject/pecan/pulls/1662/comments"},"review_comment":{"href":"https://api.github.com/repos/PecanProject/pecan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PecanProject/pecan/pulls/1662/commits"},"statuses":{"href":"https://api.github.com/repos/PecanProject/pecan/statuses/79894b0012bb2c76d45c5bfa80a50de6228a0b76"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ashiklom"}}