printing - Can you unprint a line in R? -
i writing data processing stuff , wanted have concise progress status printing fraction updates on time on single line in console.
to done wanted have
print(initiating data processing...) for(sample in 1:length(data)){ print(paste(sample,length(data),sep="/")) process(data[[sample]]) #unprint bottom line in console ... !!! ... !!!.. ? } keeping screen clean , not. don't quite know how it. know there r text progress bar utilities sake i'm looking little more control.
thanks!
i think best bet r text progress bar does, "\r return left margin", seen in file. you'll have use cat instead of print because print ends newline.
cat("initiating data processing...\n") for(sample in 1:length(data)){ cat(sample, length(data), sep="/") process(data[[sample]]) cat("\r") } cat("\n")
Comments
Post a Comment