Computational Statistics

, Volume 26, Issue 3, pp 405–418 | Cite as

Mutable objects in R

Original Paper

Abstract

Programming paradigms help us understand the differences and similarities between fundamental choices in language design. This paper looks at R in the context of three paradigms of object oriented programming: mutable versus immutable objects, generic-function versus message-passing methods, and class-based versus prototype-based inheritance. The paper also describes a new OO package for R, mutatr, which provides mutable objects with message-passing methods and prototype-based inheritance. The mutatr package is available on CRAN.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agesen O, Bak L, Chambers C, Chang B-W, Hölzle U, Maloney J, Smith RB, Ungar D, Wolczko M (2000) The SELF 4.1 programmer’s reference manual. Sun Microsystems, IncGoogle Scholar
  2. Bates D, Maechler M (2009) Matrix: sparse and dense matrix classes and methods, R package version 0.999375-29Google Scholar
  3. Bengtsson H (2003) The R.oo package—object-oriented programming with references using standard R code. In: Hornik K, Leisch F, Zeileis A (eds) Proceedings of the 3rd international workshop on distributed statistical computing (DSC 2003), Vienna, Austria, March 2003Google Scholar
  4. Chambers C (1992) Object-oriented multi-methods in cecil. In: ECOOP’92 conference proceedingsGoogle Scholar
  5. Chambers JM, Temple Lang D (2001) Object-oriented programming in r. R-news 1(3): 17–19Google Scholar
  6. Courtney A, Elliott C (2001) Genuinely functional user interfaces. In: 2001 Haskell workshop, September 2001Google Scholar
  7. Danenberg P, Eugster M (2008) Roxygen: literate programming in R. http://roxygen.org. R package version 0.1
  8. Dekorte S (2005) Io, a small programming language. In: OOPSLA05Google Scholar
  9. DeMichiel LG, Gabriel RP (1987) The common lisp object system: an overview. In: ECOOP’ 87 European conference on object-oriented programming. Springer, Berlin. http://www.dreamsongs.com/NewFiles/ECOOP.pdf
  10. Driscoll JR, Sarnak N, Sleator DD, Tarjan RE (1986) Making data structures persistent. In: STOC ’86: proceedings of the eighteenth annual ACM symposium on theory of computing. ACM, New York, pp 109–121. ISBN 0-89791-193-8Google Scholar
  11. Elliott C, Hudak P (1997) Functional reactive animation. In: International conference on functional programmingGoogle Scholar
  12. Feinberg N, Keene SE, Mathews RO, Withington PT (1997) Dylan programming: an object-oriented and dynamic language. Addison Wesley Longman Publishing Co., Inc., Redwood City. ISBN 0-201-47976-1.Google Scholar
  13. Gentleman R, Ihaka R (2000) Lexical scope and statistical computing. J Comput Graph Stat 9: 491–508MathSciNetCrossRefGoogle Scholar
  14. Hickey R (2008) The clojure programming language. In: Proceedings of the 2008 symposium on dynamic languages. ACM. New YorkGoogle Scholar
  15. Hofstadter D (1979) Gödel, escher, bach: an eternal golden braid. Basic Books, LondonGoogle Scholar
  16. Ihaka R, Gentleman R (1996) R: a language for data analysis and graphics. J Comput Graph Stat 5(3): 299–314CrossRefGoogle Scholar
  17. Kaplan H (1995) Persistent data structures. In: Handbook on data structures and applications. CRC Press, Boca RatonGoogle Scholar
  18. Kates L, Petzoldt T (2007) Proto: prototype object-based programming, R package version 0.3-8Google Scholar
  19. Okasaki C (1999) Purely functional data structures. Cambridge University Press, CambridgeMATHGoogle Scholar
  20. Rice B, Salzman L (2004) The slate programmer’s reference manualGoogle Scholar
  21. Salzman L, Aldrich J (2005) Prototypes with multiple dispatch: an expressive and dynamic object model. In: European Conference on Object-Oriented Programming. Springer, Berlin, pp 312–336Google Scholar
  22. Smith RB, Ungar D (1995) Programming as an experience: the inspiration for self. In: European Conference on Object-Oriented Programming. Springer, Berlin, pp 303–330Google Scholar
  23. Smith WR (1995) Using a prototype-based language for user interface: the newton project’s experience. In: OOPSLAGoogle Scholar
  24. Tierney L (1990) Lisp-stat: an object-oriented environment for statistical computing and dynamic graphics. Wiley, New YorkMATHCrossRefGoogle Scholar
  25. Ungar D, Chambers C, Chang B-W, Hölzle U (1991) Organizing programs without classes. Lisp Symb Comput 4(3): 223–242CrossRefGoogle Scholar
  26. Ungar D, Smith RB (1987) Self: the power of simplicity. Lisp Symb Comput 22(12): 227–241Google Scholar
  27. Van Roy P (2009) Programming paradigms for dummies: what every programmer should know. In: Assayag G, Gerzso A (eds) New Computational Paradigms for Computer Music. http://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf
  28. Van Roy P, Haridi S (2004) Concepts, techniques and models of computer programming. The MIT Press, CambridgeGoogle Scholar
  29. Verzani J (2007) gwidgets: a toolkit-independent api for building guis in r. In: useR! 2007. http://wiener.math.csi.cuny.edu/pmg/gWidgets/useR2007_presentation.pdf

Copyright information

© Springer-Verlag 2011

Authors and Affiliations

  1. 1.Rice UniversityHoustonUSA

Personalised recommendations