data(uuk_screen)
# to speed up the example we use only the first 1000 rows
uuk_screen_reduced = uuk_screen[1:1000,]
# replace all the scores with 1, except the first 100 scores of the vector
nv <- replace_non_null_elements(uuk_screen_reduced$score, c(rep(NA, 100), rep(1, nrow(uuk_screen_reduced)-100) ))
Run the code above in your browser using DataLab