In this lesson, you’ll learn some formal definitions and vocabulary for objects in R.
When you are finished, you should be able to…
Identify the structure of an object
Identify the data type(s) of an object.
Understand the required and optional arguments in a function.
Troubleshoot common error messages
This lecture did not mention the important structure of data frames.
That’s because, in essence, a data frame is simply a special list - with a few extra restrictions on the list format.
Think about the datasets you have already worked with. Which of the following restrictions on lists do you think are needed for the list to be a data frame?
What is the reason for the error below? How would you fix it?
matrix(c("a", "b", "c", "d"), num_row = 2)
## Error in matrix(c("a", "b", "c", "d"), num_row = 2): unused argument (num_row = 2)