views:

550

answers:

6

Hi,

What are some common R interview questions? I'm not sure what are the must-know for someone who claims to have working knowledge of R so I'd like to test myself.

Also, if you were an interviewer and looking for an R person, what would you ask?

Thanks..

-k

+2  A: 

I would ask some general questions about R, like how they found R, how long have they been using it, what their workflow is like, then ask them to describe a problem they solved with R that they're particularly proud of.

Then I might set a technical problem and ask them to sketch out a solution, something like 'find all the prime numbers between 1 and a million' or 'given this dataset, produce some basic statistics and summary graphs'.

PaulHurleyuk
+1 from me, nice answer
doug
nice comment doug, I put a +1 in it
Daniel Daranas
+1  A: 
  1. What are the object types in R, and what are their uses & characteristics?
  2. What are commands which have loop-like outputs, but operate quicker?
  3. A couple of quick indexing/subsetting command questions.
  4. Give them a piece of R code you know can be improved (i.e. written in fewer lines/better commands), and ask them what it does. Ask them if they can improve it.
  5. If necessary, as them how they would graphically depict statistical explorations/tests (boxplots, linear predictions, offsets/contrasts).
Dan
+3  A: 

In order to really understand behaviour, I like questions of the form:

"I'm interested in a time when you had to solve a very difficult problem in R; what was the problem, how did you approach it, what obstacles did you have to overcome, and what was the result?".

Look then for all the things you want in a team-member - a good balance between "I" and "we"; a clear, logical thought process; a willingness to admit to and overcome difficulty; clear communication with their customer; etc.

Beyond that, the usual skill/quiz type questions are useful if you want to test deep knowledge of the skill-set. Pick a couple of sample problems and ask them how they'd go about solving it, looking for the breadth/depth you're after.

caelyx
+1  A: 

REvolution Computing made a webinar on that topic, so here are the youtube links:

http://www.youtube.com/watch?v=M2u7kbcXI_k
http://www.youtube.com/watch?v=6srdi62YdxM
http://www.youtube.com/watch?v=NoV7VrE90LA
http://www.youtube.com/watch?v=_MBwNWANSb4

aL3xa
+4  A: 

Of course, the set of questions you might ask to distinguish an experienced user from a master is very different from a set optimized to distinguish a user competent with the essential features from one who just read the Wikipedia page for R the morning of their interview.

Assuming you have in mind the latter, i'm in favor of questions probative of the speed at which the R user can increase their R competence and how likely they are to be able to solve difficult problems using R even when those problems require R knowledge that they aren't likely to yet possess. So for instance:

  • I/O: Before anything else, they've got to be able to get data into R, so given a text file with 5-6 columns of data, each having a column header and starting with a few comment lines, can they use 'read.table' and pass in the few necessary parameters to create a data frame containing the data from that file?

  • Help System. If they forget a function's arguments, how quickly can they retrieve that information? Do they know about the "?" command, "example()" and "help.start()". What about the "sos" package?

  • Code Reuse. Have they created an R Package (not necessarily for distribution but as a personal library)? Do they know how to view R's Package Directory, read a summary of a package's contents, and download and install that package?

doug
+7  A: 

I always ask people to program in front of me. Before I do that I ask some basic questions to get a feel for their knowledge. For instance

  • what's the difference between a list and a dataframe, and how do you access elements from each?
  • what do you love, hate about R the most?
  • what is your favorite R package?

Once I have a baseline, I ask them to write some basic data analysis program (import some sample data and summarize it in a particular way using a custom function), and to walk me through their thought process. I always want to see them create a vectorized function as part of this.

If the interviewee seems less knowledgeable to start with I will instead give them some buggy R code and ask them to debug it. If they do well with this, then I also ask them to optimize it.

Shane