Steven Sanderson explains the value of the str() function:
In a nutshell,
str()
stands for “structure” and offers a concise summary of the structure of an R object. It presents essential details about the object, including its data type, dimensions, and the first few values. By providing an overview of your data,str()
allows you to grasp the fundamentals at a glance and proceed with a clearer understanding of what you’re working with.
str()
is a really useful function and people who develop objects in R thoughtfully can pack a lot of useful data into the one call.