My Report

R Programming Mock Test 2


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement
 10%

Question 1 of 10

1. What will be the output of the following R function?

ab <- list(1, 2, 3, "X", "Y", "Z")
dim(ab) <- c(3,2)
print(ab)

Question 1 of 10

Question 2 of 10

2. What is the meaning of the following R function?

x <- c(4, 5, 1, 2, 3, 3, 4, 4, 5, 6)
x <- as.factor(x)

Question 2 of 10

Question 3 of 10

3. What will be the output of the following R code?

 > m <- matrix(nrow = 2, ncol = 3)
 > dim(m)

Question 3 of 10

Question 4 of 10

4. In the expression x <- 4 in R, what is the class of 'x' as determined by the `class()' function?

Question 4 of 10

Question 5 of 10

5. What will be the output of the following R function?

d <- diag(5, nrow=2, ncol=2)
d

Question 5 of 10

Question 6 of 10

6. The ________ function can be used to create vectors of objects by concatenating things together.

Question 6 of 10

Question 7 of 10

7. Point out the wrong statement?

Question 7 of 10

Question 8 of 10

8. _______ will divert all subsequent output from the console to an external file.

Question 8 of 10

Question 9 of 10

9. Collection of objects currently stored in R is called as ________________

Question 9 of 10

Question 10 of 10

10. Scripts will run on ___________________

Question 10 of 10


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.