My dataframe looks like this:
N = 1000
a <- rnorm(N)
b <- rnorm(N)
df <- data.frame(a, b)
I would like to set up a conditional paste0 if the value of a is smaller than 10.
Specifically, I would like to print the value '0' (with no spaces) in front of the number in a if a < 10.
How can I do this? Thank you