prompt - R prompting [1] 1 while running a function -


i prepared complex r function running nicely. however, each time running r fills screen following expression:

  [1] 1   [1] 1   [1] 1   [1] 1   [1] 1   [1] 1 

i wondering if there way avoid prompting r. here can give example of function:

y=function(x){     results=rep(0, length(x))     (i in (1:length(x))) {           if (x[i]>0) {                      results[i]=u(x)                     }      } }  u=function(x){              output=x+1              return(output) } 

you sink("nul"), so:

u(9) #[1] 10 sink("nul") u(9) sink() u(9) #[1] 10 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -