Recently I’ve been working with a client to help their analysts improve their proficiency with R. A major challenge in engagements like this is figuring out the needs of the analysts, as well as their general attitude to the training.
To address this I created a “Pre Training Survey” to use with my client. The results from the survey helped me shape the final curriculum. Below I share the actual survey I created in case it helps someone else:
Below are a series of technical questions. They are not designed to trick you. Rather, the answers will help me know where to focus my efforts during the training.
It is perfectly fine to leave these questions blank, or to simply say “I don’t know.” Please do not use google or R to answer any of these questions.
Explain the difference between these two lines of code:
install.packages("ggplot2") library(ggplot2)
Explain the difference between these two lines of code
x = 1 x = "1"
What do these commands do?
?print print(1:3)
Consider this R code:
x = c(1,2,3)
What is the output of each of these commands?
x x[1] x[]
Consider this R code:
x = c(1,2,3)
What is the output of each of these commands?
x > 1 x[x>1]
Consider this program:
x = c(1, 2, 3) x = x * 2
What is the final value of x?
What is the output of this program?
x = c(1, 2, 3) for (i in x) { if(x[i] > 1) { print(x[i]) } }
Consider this data frame:
a = 1:3 b = 1:3 df = data.frame(a, b)
What is the output of these three commands?
df[1,1] df[1,] df$a
What does this program output to the console?
square = function(x) { x^2 } square(10)