JuliaStats / GLM.jl

Generalized linear models in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A question about the input arguments of @formula

okatsn opened this issue · comments

Dear Author,
The current way to use @formula is, for example, @formula(A ~ B), where A and B must be the column name of a specific dataframe.
I wonder if there are good reasons for the input arguments to be variable names, not objects [i.e. @formula(:A ~ :B) or @formula("A" ~ "B")] which is easier for me to understand.

Thank you for your reply in advance.

Please use the Discourse forum for questions, and keep GitHub for bug reports. Thanks!

To answer you question quickly, I think that's just for ease of use as it avoids adding more symbols to the formula. The inspiration comes from R.

Also note that only DataFrames.jl supports string indexing of columns now. Other Tables.jl data storage formats do not do it, so in general the term function does not allow strings.