On Wed, 2010-03-03 at 13:47 +0100, Helge Hafting wrote: > Νίκος Αλεξανδρής wrote: > > Hi! > > > > I was wondering how I could avoid manipulating each cell of a table > > separately in order to reduce the number of decimal numbers printed out > > (=rounding up). > > > > I 've installed the numprint package which does the rounding of the > > numbers. But I wonder: how I could perform rounding-up numbers contained > > in (all) cells in a given table at once? > > > > Is there an alternative (faste, easier) to numprint? > > If not, is there a way to "loop" over all cells and apply something like > > "\nprounddigits{3}"? > > If you have enough cells, then consider writing a script to modify > the lyx file. It might be less work.
Yes, that would be another solution (under bash for me, should not be difficult). But, hey, why not within LyX/LaTeX? There is also rccol (I am reading about it right now...). > How come you have a big table with too many decimals anyway? > I guess you didn't actually type in lots of unnecessary decimals, of course not! > is this table produced automatically somehow? Yes. Eigenvectors, result of a Principal Component Analysis derived (exported as csv) from R and imported in LyX, many tables. > Maybe it could > be produced with rounding from the start? Yes, it can. But I want to keep the values just in case... and I thought it would be less work to just round-up them up in LyX/LaTeX than produce another table from R. Maybe it isn't that easy after all. + (very important) I am keen to learn how this is to be done in LyX/LaTeX. Nikos
signature.asc
Description: This is a digitally signed message part