Self Aware Classes
[This article was first published on R Tips's blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I thought this up the other night but I’m not sure where I’m going to use it. But I thought that I would through it out there anyway, maybe it will solve all of someone else’s problems.
I was thinking about classes in R and R is SO NOT object oriented, as much as people claim that it is. There are so many things that it lacks, like data hiding, encapsulation, methods, class level variables, etc. Then I realized that the environments in R can be used in much the same way. I’ll show a couple of examples.
To leave a comment for the author, please follow the link and comment on their blog: R Tips's blog.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.