You are here

AcademyR - Certification Sample Questions


Sample Questions for Revolution R Enterprise Certified Specialist Examination
 

Below given are some sample questions for the examination. Scroll to the bottom for answers

1.Which is not a valid assignment operator?
A. < =
B. < -
C. ->
D. =
 
2.Say we let groups = c(1:3,2:4). What does tapply(groups,groups,sum) produce?
A. c(1,4,6,4)
B. c(1,2,2,1)
C. c(1,2,3,4)
D. 15
 
3.Say we have "n=3; cube<-function(n) {sq <- function()n*n;n*sq()}". What is cube(2)?
A. 8
B. 18
C. 27
D. NaN
 
4.Your customer wants to know which day of the week should they advertise on Facebook      based on the average number of clicks on their ads. They give you their big dataset   with billions of rows and you create an xdf file called data.xdf which has a factor      variable called day and a numeric variable called clicks. Which command would you use to obtain the number of clicks for each day using rxSummary()?
A. rxSummary(~day + clicks,data="data.xdf")
B. rsSummary(~day + F(clicks), data="data.xdf")
C. rxSummary(~day:clicks, data="data.xdf")
D. rxSummary(~day|clicks, data="data.xdf")

5.Estimating a generalized linear model using Revolution R Enterprise is taking too long.    Which two actions would reduce the runtime by approximately 50%? (Choose two).
A. Estimate a model on 50% as much data
B. Estimate the model with twice as many cores
C. Double the convergence criteria
D. Double the number of blocksPerChunk

6.Consider the variance function in R. For a vector x which of the expressions equals
  var(x)?
A. sum((x-mean(x))^2)/(length(x)-1)
B. sum((x-mean(x))^2)/length(x)
C. sum(abs(x-median(x)))/length(x)
D. max((x-mean(x))^2)
 
7.Say we let x = 1:25 and b = x >= 13. What is sum(b)?
A. 247
B. 234
C. 12
D. 13
 
8.Say we let y = -3:3.  Which of the following does not equal c(3:1,0:3)?
A. abs(y)
B. y after y[y < 0] = -y[y < 0]
C. c(3:0,1:3)
D. y after y[y > 0] = -y[y < 0]
 
9.Which command would you use to see the objects created during a given R session?
A. ls()
B. Objects()
C. env()
D. object()
 
10.You want to model how much money customers spend (continuous outcome). Among the below    options, what is your first step in deciding what kind of model to estimate?
A. Estimate a linear model
B. Calculate the covariance matrix for the variables of interest
C. Estimate a logistic regression
D. Calculate a histogram of the outcome variables
 
11.In the example below, we are trying to add a new variable to myData called price, which    lists the price of each fruit (prices are stored in lookup). What is the expected    outcome?

    myData <- data.frame(fruit = c("apple", "banana", "orange", "apple"))
    lookup <- c(apple=1.32, pear=2.11, orange=1.28) # prices of fruits
    myData <- rxDataStep(inData = myData,
    transforms = list(price = lookup[match(fruit, names(lookup))]))
A. We get an error, because "banana" needs to be in lookup.
B. We get an error, because "pear" is not among the fruits listed in myData
C. We get an error, because we need to add transformObjects = list(lookup=lookup) to the      arguments in rxDataStep.
D. The code runs with no error and adds prices to the data frame.

Answer key to the sample questions:

Question Answer
1 A
2 A
3 A
4 C
5 A,B
6 A
7 D
8 D
9 A
10 D
11 C