printing - R force print before function is run -


i have small bit of code want print console before runs user know

if(save_data == "y"){     print("please select file folder information populated")     file = choose.dir()     file.dir=dirname(file) }  

is there way code print in console before choose.dir() run?

you need explicitly flush console if want message reliably appear prior dialog box

flushdemo<-function()  {   cat("please select file folder information populated\n")   flush.console()   file <- choose.dir()   return(file) }  flushdemo() 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -