Github user actuaryzhang commented on the issue:

    https://github.com/apache/spark/pull/16729
  
    @felixcheung Great point! Yes, I think it's better to stick with the 
statmod syntax and allow the tweedie family to be specified 
as`tweedie(var.power, link.power)`. I tried a few ways to allow this and 
independence of statmod. The solution I came up with is creating and exporting 
a utility `tweedie` function within the SparkR package to mimic the statmod 
syntax. 
    
    It will be better to avoid exporting it while still allowing users to use 
the syntax. We would need to use unevaluated expression, e.g., 
`substitute(family)`. This works in `spark.glm` by calling first `family = 
eval(substitute(family))` and then processing as before. However, it won't work 
with `glm`: `substitute` does not work in methods that have different arguments 
from the generic:  
https://stat.ethz.ch/pipermail/r-help/2008-January/152296.html
    
    
    I also updated the doc and added some examples and comments in the 
vignettes. Let me know what you think. Thanks much! 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to