The better it is to say R to output things in a way that is convenient for your wrapper; check string functions, such as paste(), sprintf()and output the result to the output via cat(); for example, placing numbers in a column might look like this:
x<-rnorm(10)
cat(paste(x,collapse="\n"),"\n")
which only outputs:
0.889105851072202
0.86920550247321
0.817785758768382
-0.0194490361401052
1.13386492568134
0.0786139738004322
0.7431631392675
0.93881227070957
0.534225167458455
1.08265812080696
source
share