{"action":"opened","issue":{"url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/867","labels_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/867/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/867/comments","events_url":"https://api.github.com/repos/JuliaStats/DataFrames.jl/issues/867/events","html_url":"https://github.com/JuliaStats/DataFrames.jl/issues/867","id":107008592,"number":867,"title":"Categorical variables in Formula","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":0,"created_at":"2015-09-17T15:19:34Z","updated_at":"2015-09-17T15:19:34Z","closed_at":null,"body":"In the current syntax for formula, one needs to indicate a variable should be treated as a categorical variable by converting it as a PooledDataArray first. \r\n\r\nIn typical data analysis, the same variable can be alternatively as a continuous or a categorical variable, depending on the model. For instance a variable can be regressed on a trend (i.e. year as a continuous variable) or on year dummies.\r\n\r\nIt would be great to be able to specify that a variable should be treated as categorical variable in the formula. For instance\r\n\r\n```julia\r\nfit(LinearModel, y ~ pool(x), df)\r\n```\r\n\r\n\r\n"}}