{"action":"created","issue":{"url":"https://api.github.com/repos/Bioconductor/DelayedArray/issues/6","repository_url":"https://api.github.com/repos/Bioconductor/DelayedArray","labels_url":"https://api.github.com/repos/Bioconductor/DelayedArray/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Bioconductor/DelayedArray/issues/6/comments","events_url":"https://api.github.com/repos/Bioconductor/DelayedArray/issues/6/events","html_url":"https://github.com/Bioconductor/DelayedArray/issues/6","id":304337046,"number":6,"title":"Subsetting with drop=TRUE doesn't behave as expected","user":{"login":"LTLA","id":8166669,"avatar_url":"https://avatars3.githubusercontent.com/u/8166669?v=4","gravatar_id":"","url":"https://api.github.com/users/LTLA","html_url":"https://github.com/LTLA","followers_url":"https://api.github.com/users/LTLA/followers","following_url":"https://api.github.com/users/LTLA/following{/other_user}","gists_url":"https://api.github.com/users/LTLA/gists{/gist_id}","starred_url":"https://api.github.com/users/LTLA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LTLA/subscriptions","organizations_url":"https://api.github.com/users/LTLA/orgs","repos_url":"https://api.github.com/users/LTLA/repos","events_url":"https://api.github.com/users/LTLA/events{/privacy}","received_events_url":"https://api.github.com/users/LTLA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"hpages","id":8810451,"avatar_url":"https://avatars1.githubusercontent.com/u/8810451?v=4","gravatar_id":"","url":"https://api.github.com/users/hpages","html_url":"https://github.com/hpages","followers_url":"https://api.github.com/users/hpages/followers","following_url":"https://api.github.com/users/hpages/following{/other_user}","gists_url":"https://api.github.com/users/hpages/gists{/gist_id}","starred_url":"https://api.github.com/users/hpages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpages/subscriptions","organizations_url":"https://api.github.com/users/hpages/orgs","repos_url":"https://api.github.com/users/hpages/repos","events_url":"https://api.github.com/users/hpages/events{/privacy}","received_events_url":"https://api.github.com/users/hpages/received_events","type":"User","site_admin":false},"assignees":[{"login":"hpages","id":8810451,"avatar_url":"https://avatars1.githubusercontent.com/u/8810451?v=4","gravatar_id":"","url":"https://api.github.com/users/hpages","html_url":"https://github.com/hpages","followers_url":"https://api.github.com/users/hpages/followers","following_url":"https://api.github.com/users/hpages/following{/other_user}","gists_url":"https://api.github.com/users/hpages/gists{/gist_id}","starred_url":"https://api.github.com/users/hpages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpages/subscriptions","organizations_url":"https://api.github.com/users/hpages/orgs","repos_url":"https://api.github.com/users/hpages/repos","events_url":"https://api.github.com/users/hpages/events{/privacy}","received_events_url":"https://api.github.com/users/hpages/received_events","type":"User","site_admin":false}],"milestone":null,"comments":15,"created_at":"2018-03-12T11:38:13Z","updated_at":"2018-04-05T18:41:04Z","closed_at":null,"author_association":"NONE","body":"As the title suggests:\r\n\r\n```r\r\nlibrary(DelayedArray)\r\nblah <- matrix(runif(1000), ncol=20, nrow=50)\r\nX <- DelayedArray(blah)\r\nX[,1,drop=TRUE]\r\n## <50 x 1> DelayedMatrix object of type \"double\":\r\n##            [,1]\r\n##  [1,] 0.9186617\r\n##  [2,] 0.4121906\r\n##  [3,] 0.7185965\r\n##  [4,] 0.3157570\r\n##  [5,] 0.2866116\r\n##   ...         .\r\n## [46,] 0.6924624\r\n## [47,] 0.1779758\r\n## [48,] 0.8557219\r\n## [49,] 0.5277486\r\n## [50,] 0.7759722\r\n```\r\n\r\nI would have expected a vector as I would have gotten from `blah[,1,drop=TRUE]`.\r\n\r\nRunning on DelayedArray version 0.5.22.\r\n"},"comment":{"url":"https://api.github.com/repos/Bioconductor/DelayedArray/issues/comments/379036869","html_url":"https://github.com/Bioconductor/DelayedArray/issues/6#issuecomment-379036869","issue_url":"https://api.github.com/repos/Bioconductor/DelayedArray/issues/6","id":379036869,"user":{"login":"hpages","id":8810451,"avatar_url":"https://avatars1.githubusercontent.com/u/8810451?v=4","gravatar_id":"","url":"https://api.github.com/users/hpages","html_url":"https://github.com/hpages","followers_url":"https://api.github.com/users/hpages/followers","following_url":"https://api.github.com/users/hpages/following{/other_user}","gists_url":"https://api.github.com/users/hpages/gists{/gist_id}","starred_url":"https://api.github.com/users/hpages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpages/subscriptions","organizations_url":"https://api.github.com/users/hpages/orgs","repos_url":"https://api.github.com/users/hpages/repos","events_url":"https://api.github.com/users/hpages/events{/privacy}","received_events_url":"https://api.github.com/users/hpages/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T18:41:04Z","updated_at":"2018-04-05T18:41:04Z","author_association":"CONTRIBUTOR","body":"@LTLA My point is that VariantExperiment users are going to be exposed to a lot of mono-dimensional DelayedArray objects and interact with them. For example if `ve` is a VariantExperiment object, they might do things like `ve$batchid[ve$batchid == 1]`. This could possibly return a very long mono-dimensional DelayedArray object. Not sure it would be a good things if this was realilzed by default.\r\n\r\nI feel like it's a situation where we need to choose between 2 inconveniences. If `[` realizes the 1D result by default, the inconvenience would be for the user in interactive mode (getting unwanted realizations, unless s/he remembers to use `drop=FALSE`). If `[` doesn't realize them, the inconvenience is on the developer (s/he needs to remember to call as.vector() on the result if s/he wants realization). For now I'm inclined to leave the inconvenience on the developer."}}
{"actor":{"display_login":"hpages"}}