{"action":"created","comment":{"url":"https://api.github.com/repos/mlr-org/mlr/pulls/comments/202722996","pull_request_review_id":137475676,"id":202722996,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjcyMjk5Ng==","diff_hunk":"@@ -48,13 +48,17 @@ Depends:\n Imports:\n     BBmisc (>= 1.11),\n     backports (>= 1.1.0),\n+    cowplot,\n+    hrbrthemes,\n     ggplot2,\n     stats,\n     stringi,\n     checkmate (>= 1.8.2),\n     data.table,\n     methods,\n     parallelMap (>= 1.3),\n+    purrr,\n+    sf,","path":"DESCRIPTION","position":14,"original_position":14,"commit_id":"edbb2126b2690e5329819188ab215d66552228b0","original_commit_id":"edbb2126b2690e5329819188ab215d66552228b0","user":{"login":"larskotthoff","id":579233,"node_id":"MDQ6VXNlcjU3OTIzMw==","avatar_url":"https://avatars2.githubusercontent.com/u/579233?v=4","gravatar_id":"","url":"https://api.github.com/users/larskotthoff","html_url":"https://github.com/larskotthoff","followers_url":"https://api.github.com/users/larskotthoff/followers","following_url":"https://api.github.com/users/larskotthoff/following{/other_user}","gists_url":"https://api.github.com/users/larskotthoff/gists{/gist_id}","starred_url":"https://api.github.com/users/larskotthoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larskotthoff/subscriptions","organizations_url":"https://api.github.com/users/larskotthoff/orgs","repos_url":"https://api.github.com/users/larskotthoff/repos","events_url":"https://api.github.com/users/larskotthoff/events{/privacy}","received_events_url":"https://api.github.com/users/larskotthoff/received_events","type":"User","site_admin":false},"body":"But does it need to be in imports? Could it be in suggests?","created_at":"2018-07-16T15:20:01Z","updated_at":"2018-07-16T15:20:02Z","html_url":"https://github.com/mlr-org/mlr/pull/2373#discussion_r202722996","pull_request_url":"https://api.github.com/repos/mlr-org/mlr/pulls/2373","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mlr-org/mlr/pulls/comments/202722996"},"html":{"href":"https://github.com/mlr-org/mlr/pull/2373#discussion_r202722996"},"pull_request":{"href":"https://api.github.com/repos/mlr-org/mlr/pulls/2373"}},"in_reply_to_id":202591733},"pull_request":{"url":"https://api.github.com/repos/mlr-org/mlr/pulls/2373","id":199934586,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5OTM0NTg2","html_url":"https://github.com/mlr-org/mlr/pull/2373","diff_url":"https://github.com/mlr-org/mlr/pull/2373.diff","patch_url":"https://github.com/mlr-org/mlr/pull/2373.patch","issue_url":"https://api.github.com/repos/mlr-org/mlr/issues/2373","number":2373,"state":"open","locked":false,"title":"Base: Add createSpatialResamplingPlots()","user":{"login":"pat-s","id":8430564,"node_id":"MDQ6VXNlcjg0MzA1NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/8430564?v=4","gravatar_id":"","url":"https://api.github.com/users/pat-s","html_url":"https://github.com/pat-s","followers_url":"https://api.github.com/users/pat-s/followers","following_url":"https://api.github.com/users/pat-s/following{/other_user}","gists_url":"https://api.github.com/users/pat-s/gists{/gist_id}","starred_url":"https://api.github.com/users/pat-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pat-s/subscriptions","organizations_url":"https://api.github.com/users/pat-s/orgs","repos_url":"https://api.github.com/users/pat-s/repos","events_url":"https://api.github.com/users/pat-s/events{/privacy}","received_events_url":"https://api.github.com/users/pat-s/received_events","type":"User","site_admin":false},"body":"This PR enables the option to create multiple `ggplot2` objects at once that visualize spatial resampling structures. \r\nThis si important to get a feeling how the clustering was performed and investigate differences between folds or debug folds in which the model errors. \r\n\r\nIts quite flexible and can deal with multiple `resample` objects to compare spatial and non-spatial resampling. See example 2.\r\n\r\n`spatial.task` had unordered rownames that have been fixed. Rownames need to be 1:length(nrow) so that the function can work correctly. This is also checked within the function.\r\n\r\n#### Example 1\r\n\r\n``` r\r\nlibrary(mlr)\r\n#> Loading required package: ParamHelpers\r\nlibrary(cowplot)\r\n#> Loading required package: ggplot2\r\n#> \r\n#> Attaching package: 'cowplot'\r\n#> The following object is masked from 'package:ggplot2':\r\n#> \r\n#>     ggsave\r\n\r\nrdesc = makeResampleDesc(\"SpRepCV\", folds = 5, reps = 4)\r\nr = resample(makeLearner(\"classif.qda\"), spatial.task, rdesc)\r\n\r\nplots = createSpatialResamplingPlots(spatial.task, r, crs = 32717,\r\n                                     repetitions = 2, x.axis.breaks = c(-79.075),\r\n                                     y.axis.breaks = c(-3.970))\r\nplot_grid(plotlist = plots[[\"Plots\"]], ncol = 5, nrow = 2,\r\n          labels = plots[[\"Labels\"]], label_size = 8)\r\n```\r\n\r\n![](https://i.imgur.com/PAeHbG4.png)\r\n\r\nCreated on 2018-07-08 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0).\r\n\r\n#### Example 2\r\n\r\n``` r\r\nlibrary(mlr)\r\n#> Loading required package: ParamHelpers\r\nlibrary(cowplot)\r\n#> Loading required package: ggplot2\r\n#> \r\n#> Attaching package: 'cowplot'\r\n#> The following object is masked from 'package:ggplot2':\r\n#> \r\n#>     ggsave\r\n\r\nrdesc1 = makeResampleDesc(\"SpRepCV\", folds = 5, reps = 4)\r\nr1 = resample(makeLearner(\"classif.qda\"), spatial.task, rdesc1)\r\nrdesc2 = makeResampleDesc(\"RepCV\", folds = 5, reps = 4)\r\nr2 = resample(makeLearner(\"classif.qda\"), spatial.task, rdesc2)\r\n\r\nplots = createSpatialResamplingPlots(spatial.task,\r\n                                     list(\"SpCV\" = r1, \"CV\" = r2), crs = 32717, repetitions = 1,\r\n                                     x.axis.breaks = c(-79.075), y.axis.breaks = c(-3.975))\r\nplot_grid(plotlist = plots[[\"Plots\"]], ncol = 5, nrow = 2,\r\n          labels = plots[[\"Labels\"]], label_size = 8)\r\n```\r\n\r\n![](https://i.imgur.com/2Vuzv6z.png)\r\n\r\nCreated on 2018-07-08 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0).","created_at":"2018-07-08T10:02:14Z","updated_at":"2018-07-16T15:20:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cffaca1cf012b2678b9e917b902398e3431043fa","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":301971784,"node_id":"MDU6TGFiZWwzMDE5NzE3ODQ=","url":"https://api.github.com/repos/mlr-org/mlr/labels/pr-please%20review","name":"pr-please review","color":"d4c5f9","default":false},{"id":556929614,"node_id":"MDU6TGFiZWw1NTY5Mjk2MTQ=","url":"https://api.github.com/repos/mlr-org/mlr/labels/project%20-%20base","name":"project - base","color":"bfd4f2","default":false}],"milestone":{"url":"https://api.github.com/repos/mlr-org/mlr/milestones/5","html_url":"https://github.com/mlr-org/mlr/milestone/5","labels_url":"https://api.github.com/repos/mlr-org/mlr/milestones/5/labels","id":3463491,"node_id":"MDk6TWlsZXN0b25lMzQ2MzQ5MQ==","number":5,"title":"v2.13","description":"","creator":{"login":"pat-s","id":8430564,"node_id":"MDQ6VXNlcjg0MzA1NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/8430564?v=4","gravatar_id":"","url":"https://api.github.com/users/pat-s","html_url":"https://github.com/pat-s","followers_url":"https://api.github.com/users/pat-s/followers","following_url":"https://api.github.com/users/pat-s/following{/other_user}","gists_url":"https://api.github.com/users/pat-s/gists{/gist_id}","starred_url":"https://api.github.com/users/pat-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pat-s/subscriptions","organizations_url":"https://api.github.com/users/pat-s/orgs","repos_url":"https://api.github.com/users/pat-s/repos","events_url":"https://api.github.com/users/pat-s/events{/privacy}","received_events_url":"https://api.github.com/users/pat-s/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":5,"state":"open","created_at":"2018-06-29T20:19:26Z","updated_at":"2018-07-13T01:00:19Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mlr-org/mlr/pulls/2373/commits","review_comments_url":"https://api.github.com/repos/mlr-org/mlr/pulls/2373/comments","review_comment_url":"https://api.github.com/repos/mlr-org/mlr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mlr-org/mlr/issues/2373/comments","statuses_url":"https://api.github.com/repos/mlr-org/mlr/statuses/edbb2126b2690e5329819188ab215d66552228b0","head":{"label":"mlr-org:plot_spatial_resampling","ref":"plot_spatial_resampling","sha":"edbb2126b2690e5329819188ab215d66552228b0","user":{"login":"mlr-org","id":12941794,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTQxNzk0","avatar_url":"https://avatars0.githubusercontent.com/u/12941794?v=4","gravatar_id":"","url":"https://api.github.com/users/mlr-org","html_url":"https://github.com/mlr-org","followers_url":"https://api.github.com/users/mlr-org/followers","following_url":"https://api.github.com/users/mlr-org/following{/other_user}","gists_url":"https://api.github.com/users/mlr-org/gists{/gist_id}","starred_url":"https://api.github.com/users/mlr-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlr-org/subscriptions","organizations_url":"https://api.github.com/users/mlr-org/orgs","repos_url":"https://api.github.com/users/mlr-org/repos","events_url":"https://api.github.com/users/mlr-org/events{/privacy}","received_events_url":"https://api.github.com/users/mlr-org/received_events","type":"Organization","site_admin":false},"repo":{"id":12465340,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ2NTM0MA==","name":"mlr","full_name":"mlr-org/mlr","owner":{"login":"mlr-org","id":12941794,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTQxNzk0","avatar_url":"https://avatars0.githubusercontent.com/u/12941794?v=4","gravatar_id":"","url":"https://api.github.com/users/mlr-org","html_url":"https://github.com/mlr-org","followers_url":"https://api.github.com/users/mlr-org/followers","following_url":"https://api.github.com/users/mlr-org/following{/other_user}","gists_url":"https://api.github.com/users/mlr-org/gists{/gist_id}","starred_url":"https://api.github.com/users/mlr-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlr-org/subscriptions","organizations_url":"https://api.github.com/users/mlr-org/orgs","repos_url":"https://api.github.com/users/mlr-org/repos","events_url":"https://api.github.com/users/mlr-org/events{/privacy}","received_events_url":"https://api.github.com/users/mlr-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mlr-org/mlr","description":"mlr: Machine Learning in R ","fork":false,"url":"https://api.github.com/repos/mlr-org/mlr","forks_url":"https://api.github.com/repos/mlr-org/mlr/forks","keys_url":"https://api.github.com/repos/mlr-org/mlr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlr-org/mlr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlr-org/mlr/teams","hooks_url":"https://api.github.com/repos/mlr-org/mlr/hooks","issue_events_url":"https://api.github.com/repos/mlr-org/mlr/issues/events{/number}","events_url":"https://api.github.com/repos/mlr-org/mlr/events","assignees_url":"https://api.github.com/repos/mlr-org/mlr/assignees{/user}","branches_url":"https://api.github.com/repos/mlr-org/mlr/branches{/branch}","tags_url":"https://api.github.com/repos/mlr-org/mlr/tags","blobs_url":"https://api.github.com/repos/mlr-org/mlr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlr-org/mlr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlr-org/mlr/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlr-org/mlr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlr-org/mlr/statuses/{sha}","languages_url":"https://api.github.com/repos/mlr-org/mlr/languages","stargazers_url":"https://api.github.com/repos/mlr-org/mlr/stargazers","contributors_url":"https://api.github.com/repos/mlr-org/mlr/contributors","subscribers_url":"https://api.github.com/repos/mlr-org/mlr/subscribers","subscription_url":"https://api.github.com/repos/mlr-org/mlr/subscription","commits_url":"https://api.github.com/repos/mlr-org/mlr/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlr-org/mlr/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlr-org/mlr/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlr-org/mlr/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlr-org/mlr/contents/{+path}","compare_url":"https://api.github.com/repos/mlr-org/mlr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlr-org/mlr/merges","archive_url":"https://api.github.com/repos/mlr-org/mlr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlr-org/mlr/downloads","issues_url":"https://api.github.com/repos/mlr-org/mlr/issues{/number}","pulls_url":"https://api.github.com/repos/mlr-org/mlr/pulls{/number}","milestones_url":"https://api.github.com/repos/mlr-org/mlr/milestones{/number}","notifications_url":"https://api.github.com/repos/mlr-org/mlr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlr-org/mlr/labels{/name}","releases_url":"https://api.github.com/repos/mlr-org/mlr/releases{/id}","deployments_url":"https://api.github.com/repos/mlr-org/mlr/deployments","created_at":"2013-08-29T16:26:13Z","updated_at":"2018-07-15T21:06:45Z","pushed_at":"2018-07-16T07:21:56Z","git_url":"git://github.com/mlr-org/mlr.git","ssh_url":"git@github.com:mlr-org/mlr.git","clone_url":"https://github.com/mlr-org/mlr.git","svn_url":"https://github.com/mlr-org/mlr","homepage":"https://mlr-org.github.io/mlr/","size":250400,"stargazers_count":1028,"watchers_count":1028,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":287,"mirror_url":null,"archived":false,"open_issues_count":444,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":287,"open_issues":444,"watchers":1028,"default_branch":"master"}},"base":{"label":"mlr-org:master","ref":"master","sha":"aafc7de61435b111b8d9c6a67ddb70b122e84bff","user":{"login":"mlr-org","id":12941794,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTQxNzk0","avatar_url":"https://avatars0.githubusercontent.com/u/12941794?v=4","gravatar_id":"","url":"https://api.github.com/users/mlr-org","html_url":"https://github.com/mlr-org","followers_url":"https://api.github.com/users/mlr-org/followers","following_url":"https://api.github.com/users/mlr-org/following{/other_user}","gists_url":"https://api.github.com/users/mlr-org/gists{/gist_id}","starred_url":"https://api.github.com/users/mlr-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlr-org/subscriptions","organizations_url":"https://api.github.com/users/mlr-org/orgs","repos_url":"https://api.github.com/users/mlr-org/repos","events_url":"https://api.github.com/users/mlr-org/events{/privacy}","received_events_url":"https://api.github.com/users/mlr-org/received_events","type":"Organization","site_admin":false},"repo":{"id":12465340,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQ2NTM0MA==","name":"mlr","full_name":"mlr-org/mlr","owner":{"login":"mlr-org","id":12941794,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTQxNzk0","avatar_url":"https://avatars0.githubusercontent.com/u/12941794?v=4","gravatar_id":"","url":"https://api.github.com/users/mlr-org","html_url":"https://github.com/mlr-org","followers_url":"https://api.github.com/users/mlr-org/followers","following_url":"https://api.github.com/users/mlr-org/following{/other_user}","gists_url":"https://api.github.com/users/mlr-org/gists{/gist_id}","starred_url":"https://api.github.com/users/mlr-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlr-org/subscriptions","organizations_url":"https://api.github.com/users/mlr-org/orgs","repos_url":"https://api.github.com/users/mlr-org/repos","events_url":"https://api.github.com/users/mlr-org/events{/privacy}","received_events_url":"https://api.github.com/users/mlr-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mlr-org/mlr","description":"mlr: Machine Learning in R ","fork":false,"url":"https://api.github.com/repos/mlr-org/mlr","forks_url":"https://api.github.com/repos/mlr-org/mlr/forks","keys_url":"https://api.github.com/repos/mlr-org/mlr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlr-org/mlr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlr-org/mlr/teams","hooks_url":"https://api.github.com/repos/mlr-org/mlr/hooks","issue_events_url":"https://api.github.com/repos/mlr-org/mlr/issues/events{/number}","events_url":"https://api.github.com/repos/mlr-org/mlr/events","assignees_url":"https://api.github.com/repos/mlr-org/mlr/assignees{/user}","branches_url":"https://api.github.com/repos/mlr-org/mlr/branches{/branch}","tags_url":"https://api.github.com/repos/mlr-org/mlr/tags","blobs_url":"https://api.github.com/repos/mlr-org/mlr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlr-org/mlr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlr-org/mlr/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlr-org/mlr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlr-org/mlr/statuses/{sha}","languages_url":"https://api.github.com/repos/mlr-org/mlr/languages","stargazers_url":"https://api.github.com/repos/mlr-org/mlr/stargazers","contributors_url":"https://api.github.com/repos/mlr-org/mlr/contributors","subscribers_url":"https://api.github.com/repos/mlr-org/mlr/subscribers","subscription_url":"https://api.github.com/repos/mlr-org/mlr/subscription","commits_url":"https://api.github.com/repos/mlr-org/mlr/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlr-org/mlr/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlr-org/mlr/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlr-org/mlr/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlr-org/mlr/contents/{+path}","compare_url":"https://api.github.com/repos/mlr-org/mlr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlr-org/mlr/merges","archive_url":"https://api.github.com/repos/mlr-org/mlr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlr-org/mlr/downloads","issues_url":"https://api.github.com/repos/mlr-org/mlr/issues{/number}","pulls_url":"https://api.github.com/repos/mlr-org/mlr/pulls{/number}","milestones_url":"https://api.github.com/repos/mlr-org/mlr/milestones{/number}","notifications_url":"https://api.github.com/repos/mlr-org/mlr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlr-org/mlr/labels{/name}","releases_url":"https://api.github.com/repos/mlr-org/mlr/releases{/id}","deployments_url":"https://api.github.com/repos/mlr-org/mlr/deployments","created_at":"2013-08-29T16:26:13Z","updated_at":"2018-07-15T21:06:45Z","pushed_at":"2018-07-16T07:21:56Z","git_url":"git://github.com/mlr-org/mlr.git","ssh_url":"git@github.com:mlr-org/mlr.git","clone_url":"https://github.com/mlr-org/mlr.git","svn_url":"https://github.com/mlr-org/mlr","homepage":"https://mlr-org.github.io/mlr/","size":250400,"stargazers_count":1028,"watchers_count":1028,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":287,"mirror_url":null,"archived":false,"open_issues_count":444,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":287,"open_issues":444,"watchers":1028,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mlr-org/mlr/pulls/2373"},"html":{"href":"https://github.com/mlr-org/mlr/pull/2373"},"issue":{"href":"https://api.github.com/repos/mlr-org/mlr/issues/2373"},"comments":{"href":"https://api.github.com/repos/mlr-org/mlr/issues/2373/comments"},"review_comments":{"href":"https://api.github.com/repos/mlr-org/mlr/pulls/2373/comments"},"review_comment":{"href":"https://api.github.com/repos/mlr-org/mlr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mlr-org/mlr/pulls/2373/commits"},"statuses":{"href":"https://api.github.com/repos/mlr-org/mlr/statuses/edbb2126b2690e5329819188ab215d66552228b0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"larskotthoff"}}