I have this function:
func<-function(name){
paste(\"Your name is. . .\")
Sys.sleep(1.5)
paste(name)
}
This function obviously wo
Just wrap your desired output in a print
statement:
func<-function(name){
print("Your name is. . .")
Sys.sleep(1.5)
print(name)
}
#Execute Function
func("Martin")
[1] "Your name is. . ."
[1] "Martin"
I'm not quite sure what the question is, but this produces the behavior you are talking about.
func <- function(name)
{
print("Your name is. . .")
flush.console()
Sys.sleep(1.5)
print(name)
}
> func('Test')
[1] "Your name is. . ."
[1] "Test"
>