What is the purpose of the str() function in R?
a) Converts a value to a string
b) Extracts a substring
c) Displays the internal structure of an object
d) Joins two strings together
Answer:
c) Displays the internal structure of an object
Explanation:
The str() function in R displays the internal structure of an R object, which is useful for data inspection.