Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 8
R6 is currently not a built-in system (correct me if I am wrong) which might be consideration... R6 is what comes closest to usual OOP in other languages, but, as you pointed out yourself, R isn't designed for OOP, so: if you do R6, are you really really really sure no other system would do? And are you really really really sure you want to do the task with R? For users who predominantly work with R and are not experienced with other programming languages might find R6 a little strange in the beginning. S3 and S4 are more common than reference classes. S3 is very list-like in structure. I think this is comfortable if the user wants to process data in another format/ structure. S4 has more formal restrictions than S3 which means less flexibility but more "safety"/ " clarity" (?). To be fair: I myself never really tried for classes (or OOP in general) in R.
14th Apr 2021, 6:58 AM
Lisa
Lisa - avatar