Basic R Programs for Beginners
Basic R Programs for Beginners - Important Points
1. | What is the output of the following R code snippet? x <- 2 |
---|
A. 2
B. 3
C. 5
D. Error
View Answer Discuss Work SpaceAnswer: option c
Explanation:
2. | What is the output of the following R code snippet? x <- "Hello" |
---|
A. HelloWorld
B. Hello World
C. Error
D. NA
View Answer Discuss Work SpaceAnswer: option b
Explanation:
3. | What is the output of the following R code snippet? x <- c(1, 2, 3, 4, 5) |
---|
A. 1
B. 5
C. 15
D. Error
View Answer Discuss Work SpaceAnswer: option c
Explanation:
4. | What is the output of the following R code snippet? x <- 1:10 |
---|
A. 1 3 5 7 9
B. 2 4 6 8 10
C. 1 2 3 4 5
D. 2 3 5 7 11
View Answer Discuss Work SpaceAnswer: option b
Explanation:
5. | What is the output of the following R code snippet? x <- c(1, 2, 3, 4, 5) |
---|
A. TRUE TRUE TRUE FALSE FALSE
B. FALSE TRUE TRUE TRUE FALSE
C. TRUE TRUE FALSE FALSE FALSE
D. FALSE FALSE FALSE TRUE TRUE
View Answer Discuss Work SpaceAnswer: option b
Explanation: