[R] Help with printing fixed width

sahil seth
Fri, 09 Oct 2009 12:36:25 -0000

Hello R users,
I am writing a summary() for a custom class, and am to display the integers
right justified,
Say where x is the vector with integers, I am using the following:
cat("\t",format(x),"\t"...other columns)

this way I am trying to pass the format(x), to the cat function to display
it,
but still I am getting a kink(b/w the 9th and 10th row).
   6      81      170      251      1.998026e-08
   7      26      93      119      4.937587e-10
   8      96      209      305      8.750939e-11
   9      94      211      305      1.758285e-11
     10      88      205      293      6.47853e-12
     11      82      244      326      7.943691e-20
     12      57      145      202      4.964509e-10
Thanks,
--
Regards,
Sahil Seth
JHSPH

	[[alternative HTML version deleted]]