MCQs>Finance & Management>R>Given this named vector "X": > X <- c( 5, 10, 1, 20 ); > names( X ) <- c( "a", "b", "c", "d" ); Which operation is valid to show the 2nd and 4th components of X?
R MCQs
Given this named vector "X": > X <- c( 5, 10, 1, 20 ); > names( X ) <- c( "a", "b", "c", "d" ); Which operation is valid to show the 2nd and 4th components of X?
Answer
Correct Answer: X[ c("b","c") ]
Explanation:
Note: This Question is unanswered, help us to find answer for this one