Self Aware Classes

February 11, 2010
By

(This article was first published on R Tips's blog, and kindly contributed to R-bloggers)

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.

read more

To leave a comment for the author, please follow the link and comment on his blog: R Tips's blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.