‘R’ = dna.translate("AGG") . A custom C function for R, My notebook.
[This article was first published on YOKOFAKUN
, and kindly contributed to R-bloggers
]. (You can report issue about the content on this page here
Want to share your content on R-bloggers? click here
if you have a blog, or here
if you don't.
In the following post, I will show how I’ve implemented a custom C function for R. This C function will translate a DNA to a protein. I’m very new to ‘R’ so feel free to make any comment about the code.C codeThe data in ‘R’ are stored in an opaque structure named ‘SEXP’. A custom C function receives some SEXP arguments and returns another SEXP. So, the declaration of my function translate_dna is:
If you got this far, why not subscribe for updates
from the site? Choose your flavor: e-mail
, or facebook