How to Use str() Function in R
- R-PROGRAMMING
The str() function in R is used to display internal structure of an R object.
The following method shows how you can do it with syntax.
Method 1: Use str() Function
str(object) The following example shows how to use str() function in R.
Apply str() Function on Vector Let’s see how we can check internal structure of an array using str() function:
# Create vector x=c(78,89,85,84,81,79,77,85,77,78,75,74,71,79,76,78) # Show vector print(x) # Display internal structure of vector str(x) Output: