Vectors and variables

Last chapter, we saw an example of a vector: a sequence of data of the same type, for example, a sequence of numbers or a sequence of strings. When analyzing data, you almost never deal with single numbers, and the reason you need to analyze the data in the first place is likely because there are heaps of it! That’s why handling sequences of strings and numbers is central to data analysis and why vectors are core to R.

Let me show you how central vectors are to R.

Type any number in the box below and press ▶ Run Code.
👇 Enter R code in this box below 👇

_webr_editor_1 = Object {code: null, options: Object, indicator: it}
Downloading package: htmltools