ABSTRACT

This chapter presents three main data types that are important to know for using R to do research: numeric, character, and logical. A numeric type is a number, and this includes both integers like 2 and decimals like 2.5. A character is just a word or a set of words. Finally, a logical data type is just a true or false value, though in R it must be written all in capital letters: TRUE or FALSE. This is also referred to as a Boolean value. The chapter looks in detail about two important data structures - vectors and data.frames. Data structures each operate a little differently from each other so it's good to understand what they are and how they work. The chapter also presents two other data structures. The first data structure is a list. The other type of data structure is a matrix.