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...



Share this page:
Follow us:
Task Runner