controlling R output
I have this code:
x <- rnorm(10) print(x)
is returning as output:
 -0.67604293 -0.49002147 1.50190943 0.48438935 -0.17091949 0.39868189  -0.57922386 -0.08172699 -0.82327067 0.07005629
I suppose that R is having a limit of characters per line or something and that is why is splitting the result in 2 lines. I am building a service based on the output of R.
What should I do in order to get it in one line?
Than it is better to tell R to output things in a way that will be convenient to your wrapper; check out string functions like paste(), sprintf() and push the result into output with cat(); for instance putting numbers in a column could look like:
what outputs just:
0.889105851072202 0.86920550247321 0.817785758768382 -0.0194490361401052 1.13386492568134 0.0786139738004322 0.7431631392675 0.93881227070957 0.534225167458455 1.08265812080696
You can adjust the printing width in R by adjusting the options("width") option. If you give us more details about your project, maybe we could be of better use.