{"action":"opened","issue":{"url":"https://api.github.com/repos/lgatto/MSnbase/issues/386","repository_url":"https://api.github.com/repos/lgatto/MSnbase","labels_url":"https://api.github.com/repos/lgatto/MSnbase/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/lgatto/MSnbase/issues/386/comments","events_url":"https://api.github.com/repos/lgatto/MSnbase/issues/386/events","html_url":"https://github.com/lgatto/MSnbase/issues/386","id":388601020,"node_id":"MDU6SXNzdWUzODg2MDEwMjA=","number":386,"title":"Optional fdata and pdata in MSnSet constructor","user":{"login":"const-ae","id":5359014,"node_id":"MDQ6VXNlcjUzNTkwMTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5359014?v=4","gravatar_id":"","url":"https://api.github.com/users/const-ae","html_url":"https://github.com/const-ae","followers_url":"https://api.github.com/users/const-ae/followers","following_url":"https://api.github.com/users/const-ae/following{/other_user}","gists_url":"https://api.github.com/users/const-ae/gists{/gist_id}","starred_url":"https://api.github.com/users/const-ae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/const-ae/subscriptions","organizations_url":"https://api.github.com/users/const-ae/orgs","repos_url":"https://api.github.com/users/const-ae/repos","events_url":"https://api.github.com/users/const-ae/events{/privacy}","received_events_url":"https://api.github.com/users/const-ae/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-07T10:46:41Z","updated_at":"2018-12-07T10:46:41Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Sometimes I would like to quickly create a test MSnSet. From my understanding currently the standard MSnSet constructor requires the user to provide an fdata and pdata data.frame. I think it would be great if empty data.frame  would created internally, if fdata or pdata is missing\r\n\r\n``` r\r\nsuppressPackageStartupMessages(library(MSnbase))\r\n\r\nmat <- matrix(rnorm(10 * 6), nrow=10, ncol=6)\r\nrownames(mat) <- paste0(\"protein_\", 1:10)\r\ncolnames(mat) <- paste0(\"sample_\", 1:6)\r\n\r\nMSnSet(mat)\r\n#> Error in MSnSet(mat): argument \"fData\" is missing, with no default\r\n\r\nSummarizedExperiment::SummarizedExperiment(mat)\r\n#> class: SummarizedExperiment \r\n#> dim: 10 6 \r\n#> metadata(0):\r\n#> assays(1): ''\r\n#> rownames(10): protein_1 protein_2 ... protein_9 protein_10\r\n#> rowData names(0):\r\n#> colnames(6): sample_1 sample_2 ... sample_5 sample_6\r\n#> colData names(0):\r\n```\r\n\r\n<sup>Created on 2018-12-07 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)</sup>\r\n\r\nIf you think it wouldn't be too difficult, I could try to make a PR.\r\n"}}
{"actor":{"display_login":"const-ae"}}