You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on question 5 from Session 4 and I am struggling a bit with using tapply. I used expand.grid to create a data.frame of codons and amino acids. However, when I use an input vector of an arbitrary length it spits out an error message:
Error in tapply(input, codons) : arguments must have the same length
This makes sense to me since my input vector is length 1 (i.e, input <- "ATTACTAGGCTACGAA") and my data.frame is length 4 (first nucleotide, second nucleotide, third nucleotide, amino acid), but I am not sure how to fix it.
Also, I'm not sure which function I need to use in tapply to pull out the associated amino acid from the fourth column in my data.frame.
Is there anyway you can help me with this?
Thanks,
Marley
The text was updated successfully, but these errors were encountered:
Hi Will,
I have been working on question 5 from Session 4 and I am struggling a bit with using tapply. I used expand.grid to create a data.frame of codons and amino acids. However, when I use an input vector of an arbitrary length it spits out an error message:
Error in tapply(input, codons) : arguments must have the same length
This makes sense to me since my input vector is length 1 (i.e, input <- "ATTACTAGGCTACGAA") and my data.frame is length 4 (first nucleotide, second nucleotide, third nucleotide, amino acid), but I am not sure how to fix it.
Also, I'm not sure which function I need to use in tapply to pull out the associated amino acid from the fourth column in my data.frame.
Is there anyway you can help me with this?
Thanks,
Marley
The text was updated successfully, but these errors were encountered: