4NON-NUMERIC VALUES
So far, you’ve been working almost exclusively with numeric values. But statistical programming also requires non-numeric values. In this chapter, we’ll consider three important non-numeric data types: logicals, characters, and factors. These data types play an important role in effective use of R, especially as we get into more complex R programming in Part II.
4.1 Logical Values
Logical values (also simply called logicals) are based on a simple premise: a logical-valued object can only be either TRUE or FALSE. These can be interpreted as yes/no, one/zero, satisfied/not satisfied, and so on. This is a concept that appears ...
Get The Book of R 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.