My Report

R Programming Practice Test 5


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

1. CRAN package ecosystem has more than ______ packages.

2. What are the different types of sorting algorithms available in R language?

3. R has ________ statements that provide explicit looping.

4. What will be the output of the following R code snippet?

 > paste("a", "b", se = ":") 

5. Point out the correct statement?

6. What will be the output of the following R code snippet?

> f <- function(num = 1) {
+        hello <- "Hello, world!\n"
+        for(i in seq_len(num)) {
+                cat(hello)
+         }
+         chars <- nchar(hello) * num
+         chars
+ }
> f()

7. Two vectors M and N are defined as M <- c(3, 2, 4) and N <- c(1, 2). What will be the output of vector Z that is defined as Z <- M*N.

8. Which of the following is valid syntax for if else statement in R?

9. What is the memory limit in R for 64 bit system?

10. Which of the following code will print NULL?


 

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.