Logo

R Questions Set 9:

Quiz Mode

How do we access elements in R?

1
2
3
4

Solution:

What will be the output of log(-20) when executed on an R console?

1
2
3
4

Solution:

Which of the following methods creates a vector of repeated values?

1
2
3
4

Solution:

Which of the following statements creates a mosaic plot?

1
2
3
4

Solution:

Which of the following functions is used to find the correlation matrix?

1
2
3
4

Solution:

A function, together with an environment, makes up what is called a function closure.

1
2
3
4

Solution:

The _____ function allows you to modify the error behavior so that you can browse the function call stack.

1
2
3
4

Solution:

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


> lm <- function(x) { x * x }
> lm

1
2
3
4

Solution:

What will be the output of the following R code?

f <- function(num) {
hello <- "Hello, world!\n"
chars <- nchar(hello) * num
}

meaningoflife <- f(3)
print(meaningoflife)

1
2
3
4

Solution: