R - Str (Structure)

Card Puncher Data Processing

About

Str display compactly the internal structure of an R object.

Str is an alternative for summary

Example

> v <- c(1,-2,3.3,7,-3)
> str(v)
 num [1:5] 1 -2 3.3 7 -3

where

  • num: indicates the numeric class
  • [1:5]: from one to 5 elements
  • 1 -2 3.3 7 -3: the elements





Discover More
Card Puncher Data Processing
R - (Datatype|Type|Storage Mode) of an object (typeof, mode)

In the C code underlying R, all objects are pointers to a structure with typedef SEXPREC; the different R data types are represented in C by SEXPTYPE, which determines how the information in the various...
Card Puncher Data Processing
R - (Object|Variable|Symbol)

R provides a number of specialized objects. They are created (instantiated), used and referenced through variable (known as symbol). When you read the term object in the documentation, you can interchange...
Card Puncher Data Processing
R - Factor (Category, Enumerated Type)

The factor function is used to encode a vector as a factor (ie categorical data). When used with a numeric or a date, a binning function will return a factor. From numeric to a category (For instance,...
Card Puncher Data Processing
R - Function

Functions are stored as R objects with the class function Functions can be: used as arguments of other functions nested where: arglist is a list of argument including the three dot argument....
Card Puncher Data Processing
R - Names

in R. A name permits to address a value. An object may have several values and then several names. For a data.frame or a list, it will be the column header. You can set and/or get them. The...
Card Puncher Data Processing
R - Vector

The Vector in R contains elements of the same class. A Vector with different class of objects is a list. A vector (as every object) can also have . Almost all data in R is a vector or is based upon...



Share this page:
Follow us:
Task Runner