-
Some love for Base R. Part 4
Following on parts 1, 2 & 3—yes, a series—we arrive to part 4 revisiting Base R. See part 1 for the rationale, in case you’re wondering Whyyyy? A typical question going back to Base from the tidyverse: How do I join datasets? What do I use instead of bind_rows() and bind_cols()? Easy, rbind() and cbind(),…
-
Anyone using other than RStudio?
I asked both in Mastodon and Twitter “Anyone using other than #RStudio as their main #rstats IDE?” and—knowing that some programmers are literal and would probably reply ‘Yes’—I added “What is it?” Of course I got a few replies like “I only have used RStudio” (Why reply?) or “I use RStudio but in docker containers”…
-
Creating an n x n autocorrelation matrix
Between covid-19 news and announcements of imminent Russia-Ukraine wars I needed a bit of a distraction. Sooo, here it is how to create an n x n autocorrelation matrix based on a correlation rho, with a simple 5 x 5 example in R: This produces the following output: [,1] [,2] [,3] [,4] [,5] [1,] 1.0000…
-
The beauty of code vectorisation
I came across this problem in Twitter: The basic pieces of the problem are:
-
Recreational programming
I think programming, aka coding, is a fun activity. We are solving a problem subject to a set of constraints that can be time, memory, quantity of code, language, etc. Besides being a part of my work, coding is also a good distraction when doing it for the sake of it. In this type of…