Skip to main content

Writing Reusable Functions

  • Chapter
Beginning R
  • 8537 Accesses

Abstract

As you learned in the previous chapters, everything in R is an object. This makes R an object-oriented programming language. There are many built-in functions and thousands more contributed by the R community. Before you consider writing your own function for a particular problem, check the R documentation and discussions to see if someone else has already done the work for you. One of the best things about the R community is that new packages appear regularly, and it is quite likely someone else has already faced and solved the same programming problem. If they haven’t, it is easy enough to create your own functions.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 39.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Larry Pace

About this chapter

Cite this chapter

Pace, L. (2012). Writing Reusable Functions. In: Beginning R. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4555-1_3

Download citation

Publish with us

Policies and ethics