1. Yesterday (on the opening day of the new Batman movie) I search the Internet for the Batman formula and it's implementations in R. I found several links that used the ggplot2 library however only one was working with the latest version of the package. With minor changes, this is the result that I got for the Batman curve.


      In order to distinguish the codes for the individual curves you can run this script in R which will result to the following image


    0

    Add a comment


  2. I just needed to come up with a name for my blog, so as most of the times, when I'm working in the lab I got some help from my favourite programming language, R. See if you could find a better name with playing a round with the seedNumber, and nameSize parameters. You might find another unique name that no one have ever herd before, such as gattaca. OK, maybe this wouldn't be a unique name to choose after all !

    Open  R programming language environment

    type


    dnaSeqRandGenerator<- function(seedNumber=NULL, nameSize=4){
        DNAseqs<- c("A","C","G","T")
        set.seed(seedNumber)

        generatedName<- 
            paste(sample(DNAseqs, nameSize, replace=T), 
                collapse="")    
        return(generatedName)
    }


    You'll first see the result of my run, i.e. my blogs name. Try running the function dnaSeqRandGenerator with other parameters.
     
    RNGkind(sample.kind="Rounding")

    dnaSeqRandGenerator(seedNumber=13, nameSize=7)
    #[1] "GACATAG" 
     
    RNGkind(sample.kind="default") 

    Update!
    The earlier codes (i.e. green codes above) no longer produces "GACATAG" as there were some changes made to the way that sample() function works in R 3.6.0 . To be able to reproduce, we will need to change the random number generator to the old way by adding RNGkind(sample.kind="Rounding") command. You can reset the random numbr generator to the current default by using RNGkind(sample.kind="default") .

    (Last updated on 2nd, Jan, 2023)
    0

    Add a comment

Labels
Blog Archive
About Me
About Me
My Photo
I am a Postdoc researcher at the Neuromuscular Disorders Research lab and Genetic Determinants of Osteoporosis Research lab, in University of Helsinki and Folkhälsan RC. I specialize in Bioinformatics. I am interested in Machine learning and multi-omics data analysis. My go-to programming language is R.
My Blog List
My Blog List
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.