πŸ“Š R Programming
Q. What will be the output of the following R code?
> x <- c("a", "b", "c", "d")
> for(i in 1:4) {
+ ## Print out each element of 'x'
+ print(x[i])
+ }
  • (A) [1] "a" [1] "b" [1] "c" [1] "d"
  • (B) [1] "c" [1] "b" [1] "a" [1] "d"
  • (C) [1] "d" [1] "c" [1] "b" [1] "a"
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) [1] "a" [1] "b" [1] "c" [1] "d"

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
90
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate