Logo

R Questions Set 24:

Quiz Mode

The R package _____ lets you perform SQL queries on your data frames.

1
2
3
4

Solution:

 

R objects can have attributes, which are like ________ for the object 

1
2
3

Solution:

A _____ is an R object that can contain elements of different data types.

1
2
3
4

Solution:

Which of the following functions generate random Poisson variates with a given rate?

1
2
3
4

Solution:

 Which of the following produces bivariate scatterplots or time-series plots?

1
2
3
4

Solution:

How many coefficients do you need to estimate in a simple linear regression model with one independent variable?

1
2
3
4

Solution:

Which function computes the time (in seconds) needed to execute an expression?

1
2
3
4

Solution:

 What will be the output of the following R code?

 

> x <- c(1, 2, NaN, NA, 4)
> is.na(x)

1
2
3
4

Solution:

Which of the following statements about R is incorrect?

1
2
3
4

Solution:

function(p) {
     params[!fixed] <- p
     mu <- params[1]
     sigma <- params[2]
 

  ## Calculate the Normal density
     a <- -0.5*length(data)*log(2*pi*sigma^2)
     b <- -0.5*sum((data-mu)^2) / (sigma^2)
     -(a + b)
  }

> ls(environment(nLL))

1
2
3
4

Solution: