I have this code:
x <- rnorm(10)
print(x)
is returning as output:
[1] -0.67604293 -0.49002147 1.50190943 0.48438935 -0.17091949 0.39868189
[7] -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 withcat(); for instance putting numbers in a column could look like:what outputs just: