Frequently Asked Questions:
8.31 Where can I find due dates for assignments?
All assignment deadlines can be found in BBLearn. Within this textbook we have suggestions for the timing of all writen questions, coding labs and final culmination writes ups. All material by infrastructure is due before we begin the next infrastructure.
8.32 How do I submit assignments?
All assignments (except the very first git assignment) are submitted via BBLearn as both .Rmds and .pdfs
8.33 Do I still have to submit written exercises as .Rmd and .pdf?
Yes.
8.34 What’s better for code, conciseness or readability?
Readability > Conciseness
I personally almost always use dplyr, my thoughts, pulled largely from Dr. Derek Sonderegger’s Statistical Computing Course are below:
The pipe command in dplyr
%>%
allows for very readable code. The idea is that the %>%
operator works by translating the command a %>%
f(b) to the expression f(a,b). This operator works on any function and was introduced in the magrittr
package. The beauty of this comes when you have a suite of functions that take input arguments of the same type as their output. They are human readable!
For example if we wanted to start with x, and first apply function f(), then g(), and then h(), the usual R command would be h(g(f(x))) which is hard to read because you have to start reading at the innermost set of parentheses. Using the pipe command %>%
, this sequence of operations becomes x %>%
f() %>%
g() %>%
h().
Dr. Hadley Wickham (aka R genius) gave the following example of readability:
bopping(
scooping_up(
hopping_through(foo_foo),
field_mice),
head)
is more readably written:
foo_foo %>%
hopping_through(forest) %>%
scooping_up( field_mice) %>%
bopping( head )
In dplyr, all the functions take a data set as its first argument and outputs an appropriately modified data set. This allows me to chain together commands in a readable fashion. Then in 3 months I don’t have to wonder what on earth I was doing last time I opened this project, if I filtered the data, etc etc. Your future self will sincerely thank your past self.
8.36 How can I best prepare for class and succeed?
Read the textbook, click on linked resources including videos, review materials as we go or read ahead.
Complete assignments as we go or ahead of time. Do not wait until the last minute.
Pick a ‘coding buddy’ and help each other tackle errors that arise.
Reach out to your instructors if you need clarification on assignments.