Is there a way to use lapply()
in a manner that forces it to wait for "enter" from the user before stepping through the next element of the list? If so, could you provide a simple example?
Here is the example:
es <- list(1, 2, 3)
lapply(es, function(e) {
cat("Press enter:")
readLines(n = 1)
print(e)
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With