MCQs > Finance & Management > R > Suppose X is the vector c(1:10). Which R code will swap the values of the 3rd element of X and the 7th element of X?

R MCQs

Suppose X is the vector c(1:10). Which R code will swap the values of the 3rd element of X and the 7th element of X?

Answer

Correct Answer: X[c(3,7)] <- X[c(7,3)]

Explanation:

Note: This Question is unanswered, help us to find answer for this one

R Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

R Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it