in Education by
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 This question was posed to me in a national level competition. This intriguing question originated from Overview of R in division History, Overview and Getting Started of R Programming Select the correct answer from above options

1 Answer

0 votes
by
 
Best 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.

Related questions

0 votes
    What is the function to set row names for a data frame? (a) row.names() (b) colnames() (c) col. ... Getting Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Dataframes can be converted into a matrix by calling the following function data ______ (a) matr() (b) matrix ... of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Which of the following can be used to display the names of (most of) the objects which are currently stored ... of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    __________ function is used to watch for all available packages in library. (a) lib() (b) fun.lib() (c ... Started of R Programming Select the correct answer from above options...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    What is the function used to test objects (returns a logical operator) if they are NA? (a) is.na() ... Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Which function is used to automatically vectorize? (a) lapply() (b) kapply() (c) mapply() (d) happly( ... Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Matrices can be created by row-binding with the help of the following function. (a) rjoin() (b) rbind() ... Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    If the code is stored in the external file, which of the following function is used to call them to a ... Started of R Programming Select the correct answer from above options...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    What is the function used to test objects (returns a logical operator) if they are NaN? (a) as.nan() ... Started of R Programming Select the correct answer from above options...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    The R-help and _____ mailing lists have been highly active for over a decade now. (a) R-mail (b) R ... Getting Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    Which of the following is default prompt for UNIX environment? (a) > (b) >> (c) < (d)...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    In 2004, ________ purchased the S language from Lucent for $2 million. (a) Insightful (b) Amazon (c) IBM ... Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    In ________ Insightful purchased the S language from Lucent for $2 million. (a) 2002 (b) 2003 (c) 2004 (d ... Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
0 votes
    How to install for a package and all of the other packages on which for depends? (a) install.packages (for ... Started of R Programming Select the correct answer from above options...
asked Feb 15, 2022 in Education by JackTerrance
...