Objects

There are many special object types within R that are designed to make it easier to analyze data. Functions in R can be polymorphic—that is to say, they can respond to different data types in different ways in order to produce the output that the user desires. For example, the plot() function in R responds to a wide variety of data types and objects, including single-dimension vectors (each value of y plotted sequentially) and two-dimensional matrices (producing a scatterplot), as well as specialized statistical objects, such as regression models and time series data. In the latter case, plots that are specialized for these purposes are produced.

As with the rest of this introduction, don't worry if you haven't written functions before, ...

Get Web Application Development with R Using Shiny - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.