{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/827","labels_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/827/comments","events_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/827/events","html_url":"https://github.com/JuliaStats/DataFrames.jl/pull/827","id":90782844,"number":827,"title":"predict on dataframes with missing rows","user":{"login":"matthieugomez","id":6223837,"avatar_url":"https://avatars.githubusercontent.com/u/6223837?v=3","gravatar_id":"","url":"https://api.github.com/users/matthieugomez","html_url":"https://github.com/matthieugomez","followers_url":"https://api.github.com/users/matthieugomez/followers","following_url":"https://api.github.com/users/matthieugomez/following{/other_user}","gists_url":"https://api.github.com/users/matthieugomez/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieugomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieugomez/subscriptions","organizations_url":"https://api.github.com/users/matthieugomez/orgs","repos_url":"https://api.github.com/users/matthieugomez/repos","events_url":"https://api.github.com/users/matthieugomez/events{/privacy}","received_events_url":"https://api.github.com/users/matthieugomez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-24T21:20:24Z","updated_at":"2015-06-25T16:04:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/pulls/827","html_url":"https://github.com/JuliaStats/DataFrames.jl/pull/827","diff_url":"https://github.com/JuliaStats/DataFrames.jl/pull/827.diff","patch_url":"https://github.com/JuliaStats/DataFrames.jl/pull/827.patch"},"body":"In case there are missing regressors in the dataframe `df`, `(mm::DataFrameRegressionModel, df::AbstractDataFrame)` currently returns a vector of length lower than `size(df, 1)`.\r\n\r\nI think it should always return a vector of length equal to `size(df, 1)` (potentially with missing values), so that it remains aligned with the initial dataframe, ie one can  do\r\n```\r\ndf[:yp] = predict(mm, df)\r\n```\r\nTo get back the old behavior, one just needs to remove missing values in the output.\r\n\r\nI know missing values are currently being redone so this pull request won't impact anything - but this is a general discussion and rewriting the current predict function makes my point clearer."},"comment":{"url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/comments/115304885","html_url":"https://github.com/JuliaStats/DataFrames.jl/pull/827#issuecomment-115304885","issue_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/827","id":115304885,"user":{"login":"kleinschmidt","id":135920,"avatar_url":"https://avatars.githubusercontent.com/u/135920?v=3","gravatar_id":"","url":"https://api.github.com/users/kleinschmidt","html_url":"https://github.com/kleinschmidt","followers_url":"https://api.github.com/users/kleinschmidt/followers","following_url":"https://api.github.com/users/kleinschmidt/following{/other_user}","gists_url":"https://api.github.com/users/kleinschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/kleinschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kleinschmidt/subscriptions","organizations_url":"https://api.github.com/users/kleinschmidt/orgs","repos_url":"https://api.github.com/users/kleinschmidt/repos","events_url":"https://api.github.com/users/kleinschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/kleinschmidt/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T16:04:08Z","updated_at":"2015-06-25T16:04:08Z","body":"This looks good to me.  The failing tests are just because of the missing `::Colon` indexing support which is fixed by #826.  "}}