Posts

Showing posts with the label R coding

Fact check: is Omicron less dangerous than Delta?

Image
 I had a lot of ideas for the next post... I really wanted to have a look at another problem of humankind: climate change, wealth distribution or perhaps gender equity. There's so much interesting data beyond the SARS-CoV-2 pandemic! But: the new variant of our most popular pathogen dominated the news of the last four weeks, fueled people's fears and hopes at the same time and spoiled my plans. Yes, your right, that's the Omicron, coined a 'mild' or 'cold-like' coronavirus and expected to change the way we experience and manage the pandemic. Does it hold true? I had to crunch some data to convince myself... Omicron: no more than highly transmissible cold bug? I allow myself to skip an extended introduction on Omicron: it's omnipresent in media and European populations - the chances that you have already experienced an infection or experience one in the forthcoming four weeks are quite good. To sum up:  we're facing an extremely infectious pathogen, w...

New R installation with your old library collection: a scripting solution

Few days ago, I installed a 'fresh' Windows and used this opportunity to migrate to the newest version of R ( 4.0.3 ) and R Studio ( 1.3.1093 ). At the same time, as most users, I wanted to keep my library collection from the previous installations. There are many ways to achieve that: you may copy your old library folder to the 'fresh' one and update the packages in R, for example. But, because each version of base R has obviously a bit changed internals, you can be almost sure, that the update will fail for a quite number of them.   This time I took it as a little challenge and set off to develop a simple tool which 'migrates' my libraries to the new R version. The first step was to get a list of the installed packages in the old R. Provided you it is still up, you may simply retrieve a named matrix with names of the installed packages by calling installed.packages() function. The output is a bit verbose, n fact, you just need the 'Package' column to ...