When does it pay off to use S4 methods in R programming

前端 未结 7 1322
不知归路
不知归路 2020-12-12 13:55

I program regularly in R in a professional context, and I write packages for clients or co-workers as well. Some of the programmers here have a Java background and insist on

7条回答
  •  盖世英雄少女心
    2020-12-12 14:21

    S4 classes play a strong part in spatial statistics (sensu package sp), where converting from one type of data to the other seems seamless. The pitfall of this is debugging, which has been, in my experience, tedious at best. So far, I have managed with S3 but may consider using S4 in the future.

    With time, as things get played around a lot, I believe they will play a strong role in at least core features of various fields of R (may that be spatial analysis, econometrics, environmetrics...)

提交回复
热议问题