For concisely displaying a R object's internal structure, use the str() method. It can even show the internal layout of very long nested lists. For the most basic R objects, it gives a one-liner output informing the user of the object's components. Although it can be used as a substitute for summary(), str() is more condensed than summary (). It provides information on the rows (observations) and columns (variables) in addition to extra information like the titles of the columns, class of each column, and a few of the initial observations of each column.
syntax: object, str(...)
Any R object for which information is required as a parameter is called an object.