Saved Bookmarks
| 1. |
What is the function to set column names for a matrix?(a) names()(b) colnames()(c) col.names()(d) column name cannot be set for a matrix |
|
Answer» The correct option is (b) colnames() The explanation: colnames() is the function to set column names for a matrix. rownames() is the function to set row names for a matrix. But we can’t use both at a time. Column names and row names can be set separately using the colnames() and rownames() functions. |
|