I am looking at a simple way to do the difference between multiple columns within a single dataframe and get the results within the same dataframe. Here is a reproducible example where I would like to subtract var1 from var1.bis, var2 for var2.bis, etc.
df1 <- data.frame(var1 = sample(1:10),
var2 = sample(1:10),
var3 = sample(1:10),
var1.bis = sample(1:10),
var2.bis = sample(1:10),
var3.bis = sample(1:10))