.old_wd <- setwd(tempdir())
seq_file_ops(n = 10, target_dir = "munge")
# Increase files numbered 6 and above by 1
adj_file_nos(target = 6, directory = "munge")
# Increase above target files by a further 2
adj_file_nos(target = 6, directory = "munge", step = 2)
# Use step = "down" to restore original sequence
adj_file_nos(target = 6, directory = "munge", action = "down", step = 3)
# writing books or websites:
seq_file_ops(n = 5, target_dir = "images", filetype = "png")
# adjust by decimals
adj_file_nos(target = 1, directory = "images", step = 0.1)
# tidying up environment
unlink(c("munge", "images"), recursive = TRUE)
setwd(.old_wd)
Run the code above in your browser using DataLab