Data Types — R Objects and Attributes

R Programming objects and attributes

Kurt F.
The Startup

--

Photo by Franki Chamaki on Unsplash

In this article we’ll cover an important issue for R. We will talk about the different types of data used in R. We will also learn about some basic operations on data types.

If you’re ready, let’s get started:

Objects

Everything you manipulate in R, everything we encounter in R, objects that can be called objects, objects can all be of different types, contain all different types of data. But everything in R is an object. So R has five basic classes of atomic objects. These are fairly low levels or basic object classes, character, numeric. So these are like real numbers or decimal numbers, integers, complex numbers, and logicals

The most basic object in R is called a vector. One thing you cannot do with a standard vector is have mixed types of objects you cannot have a vector of characters and numerics, or numerics and integers, or integers and logicals. And everything in a vector has to be the same class.

Somtimes there’s one type of vector that can have multiple different types of classes. This is a “list”. So a list is represent as a vector, it’s a sequence of objects. But each element of that vector can be a different and ofcourse can be an object of a different…

--

--