Blog of Andrés Aravena
CMB2:

# Fixing Errors in the Exam

26 June 2020

People are already working on the exam, and they found some errors in the questions. My mistake, I did not check enough. I apologize.

# Error on Question 1.1.

The description talks about a function called baby_rabbits(). You should write that function. But in the answer-1.R file, I wrote it wrong. I just fixed the template file. I recommend that you download it again.

You can see that, in the code to test your answer, we evaluate the function baby_rabbits() for values between 1 and 24, and store the results in a vector called bunnies. Just in case, let me remind you that —according to the dictionary— a bunny is a rabbit, especially a young one.

In summary, in Question 1.1, the function that you should write is called baby_rabbits() and the results are stored in a vector called bunnies.

That is the only error found (so far). If you see something else, please let me know, and I will fix it and tell everybody.

Just for being comprehensive, in Question 1.2, the function is called breeding(), and the results are stored in a data frame called rabbits. In Question 1.3, there is only a data frame, called new_rabbits, which is also used in Question 1.4.

# Error on question 2.5

Here the input of gene_cai() function should be called number_of_codons to avoid confusion with the function codon_count(). The question should be this:

Write a function, called gene_cai(), that takes a vector number_of_codons and returns the weighted average of codon_adaptness for each codon.

In other words, you must multiply each component of number_of_codons with the corresponding component of codon_adaptness, sum all the results, and then divide by the sum of all number_of_codons. This answer must be a function.

If you could not calculate codon_adaptness in the previous question, then you can use the values for E.coli, that you can download here.

gene_cai <- function(number_of_codons, codon_adaptness) {
}