Just to add that the recommended approach to programmatically generating formula terms is by constructing the Term objects directly, as referenced in the StatsModels API here: Modeling tabular data · StatsModels.jl
yes that looks exactly like what I need. I think we should add the sentence to this example with the log function - I had no incentive to look any further, given that example.
this is going to work only in cases with non-ambigous dispatch, for example, the log example below. For functions with multiple arguments you will need to extent the formula syntax as explained there