For historial reasons many of my I have dozens of version-controlled projects using mercurial (hg) hosted on Bitbucket. Since Bitbucket not only discontinued support for mercurial but also decided to delete those repositories, I have been planning to convert those to git - it only took me two years. Since I was getting my hands dirty with this, I took the opportunity to convert hg to git and upload to gitlab in one fell swoop. Here is how.
I am a bit of a DB n00b but for a project I had to setup and query an rather larger
sqlite database from an existing dump and schema. Here are a couple if things I leaned after asking for help.
TLDR; I made a visual timeline of my career (CV) completely in R.
Here I will show how it was done, and in the process how to hack
ggplot objects, add images to plots, and use pretty much any font in
This is the final result, and if you are interested on how it was generated, read on.
My post about cloning all bitbucket, originally posted on my old wordpress blog, got some attention over the internet. Well, three or four mentions. Sadly the information in there has been outdated due to Bitbucket’s API changes. That added to the shocking decision by Bitbucket to stop supporting mercurial repos and delete them (!) pushed me to finally download all my repos (again) and eventually move to gitlab. Maybe in a follow up post I will detail how I converted all hg repos to git.
Let’s face it: we all write ugly R code. Either because we are in a hurry, or we copy pasted from stackoverflow, or our coding style just changed over the course of time, it doesn’t really matter: my code is not well formatted and barely adheres to any formatting convention no matter how much I tell myself otherwise. I could do it from an R console or in Rstudio. However the command-line option is too much of an hassle and I use Sublime Text.
I have been toying with the idea of making an R package for sometime. To me this is the natural step after been an
R user for some years now. Though I had some ideas they all sounded either a bit too over-complicated for a starting package, or not useful enough. In ideal world, and for me personally, I would write a package with a single function, that I could use, to learn the ropes.
I was doing something that should be easy but I couldn’t find a solution online: remove overlapping coordinates in a single bed file and these must be within a certain distance. In this example:
[This is an updated version of this post with improved functions and a reproducible example]