{"action":"created","issue":{"url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/36","labels_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/36/comments","events_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/36/events","html_url":"https://github.com/HenrikBengtsson/matrixStats/issues/36","id":83368692,"number":36,"title":"colIQRs reports error when x is an one-column matrix","user":{"login":"everdark","id":3348233,"avatar_url":"https://avatars.githubusercontent.com/u/3348233?v=3","gravatar_id":"","url":"https://api.github.com/users/everdark","html_url":"https://github.com/everdark","followers_url":"https://api.github.com/users/everdark/followers","following_url":"https://api.github.com/users/everdark/following{/other_user}","gists_url":"https://api.github.com/users/everdark/gists{/gist_id}","starred_url":"https://api.github.com/users/everdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/everdark/subscriptions","organizations_url":"https://api.github.com/users/everdark/orgs","repos_url":"https://api.github.com/users/everdark/repos","events_url":"https://api.github.com/users/everdark/events{/privacy}","received_events_url":"https://api.github.com/users/everdark/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-01T07:50:39Z","updated_at":"2015-06-01T14:27:14Z","closed_at":"2015-06-01T14:27:14Z","body":"Hi, \r\nI've found that `colIQRs` behaves differently from `colMedians` when its matrix argument has only one column. Specifically, `colMedians` can deal with one-column matrix as expected, while `colIQRs` reports error as this:\r\n```\r\nError in Q[, 2L, drop = TRUE] : incorrect number of dimensions\r\n```\r\n\r\nA simple script to test about this issue:\r\n```\r\nmm <- matrix(rnorm(20), 10, 2)\r\nidentical(colMedians(mm), apply(mm, 2, median)) # TRUE\r\nidentical(colIQRs(mm), apply(mm, 2, IQR)) # TRUE\r\n\r\nmm <- matrix(rnorm(10), 10, 1)\r\nidentical(colMedians(mm), median(mm)) # TRUE\r\ncolIQRs(mm) # error\r\n```\r\n\r\nI am using 0.14.0. \r\n```\r\n> sessionInfo()\r\nR version 3.2.0 (2015-04-16)\r\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\r\nRunning under: OS X 10.10.3 (Yosemite)\r\n```"},"comment":{"url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/comments/107520654","html_url":"https://github.com/HenrikBengtsson/matrixStats/issues/36#issuecomment-107520654","issue_url":"https://api.github.com/repos/HenrikBengtsson/matrixStats/issues/36","id":107520654,"user":{"login":"HenrikBengtsson","id":1616850,"avatar_url":"https://avatars.githubusercontent.com/u/1616850?v=3","gravatar_id":"","url":"https://api.github.com/users/HenrikBengtsson","html_url":"https://github.com/HenrikBengtsson","followers_url":"https://api.github.com/users/HenrikBengtsson/followers","following_url":"https://api.github.com/users/HenrikBengtsson/following{/other_user}","gists_url":"https://api.github.com/users/HenrikBengtsson/gists{/gist_id}","starred_url":"https://api.github.com/users/HenrikBengtsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenrikBengtsson/subscriptions","organizations_url":"https://api.github.com/users/HenrikBengtsson/orgs","repos_url":"https://api.github.com/users/HenrikBengtsson/repos","events_url":"https://api.github.com/users/HenrikBengtsson/events{/privacy}","received_events_url":"https://api.github.com/users/HenrikBengtsson/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T14:27:14Z","updated_at":"2015-06-01T14:27:14Z","body":"Thank you for the report.  This bug was actually fixed yesterday (commit db093ae by @Dongcan-Jiang):\r\n\r\no BUG FIX: rowQuantiles() and rowIQRs() did not work for single-row matrices.  Analogously for the corresponding column functions.\r\n\r\nUntil we push out next version of matrixStats to CRAN, you can install the developers version (0.14.0-9000) of this package by:\r\n```r\r\nsource(\"http://callr.org/install#HenrikBengtsson/matrixStats@develop\")\r\n```\r\n(depending on your setup, there might be quite a few extra package installed in order to be able to install from GitHub like this).  Let me know if this doesn't work.\r\n\r\n\r\n"}}