Created
September 21, 2022 08:47
-
-
Save simonrolph/00f6aa54855b65ace644d1f76179cd30 to your computer and use it in GitHub Desktop.
Percentage progress in a loop for R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n <- 1004 | |
for(i in 1:n){ | |
Sys.sleep(0.2 | |
cat("\r",round(i/n*100,2),"%") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment