6  Objects

Common objects in R include:

Entries in the objects can be categorized into certain data types.

A vector can only contain data of the same class, but a list can contain data of different classes.

We could use class() and str() to check the object/data type.

Some people prefer to use the attributes() function.

Exercise C

Q1

Use class(), str() and attributes() to check the object/data type of iris and 'iris'.