You can use head
with a negative argument:
transform(dat,day_before=c(NA,head(dat$NB_USERS_CONNECTED,-1)))
DAY NB_USERS_CONNECTED day_before
1 1 10 NA
2 2 14 10
3 3 15 14
4 4 11 15
5 5 17 11
6 6 11 17