Self Aware Classes
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 his blog: R Tips's blog
offers daily e-mail updates
news and tutorials
on topics such as: visualization (ggplot2
), programming (RStudio
, Web Scraping
) statistics (regression
, time series
) and more...
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook