r - How to control wrong pagebreaks of longtable in latex() from Hmisc package? -


I am using Swive and Latex () from the Hmisc package to include long in my PDF.

When I do this for the first time, the table spreads well, filling pages with the table.

If I do this again, then some pages are only half full (like page 4 of the PDF), which seems weird and in some way wrong because it is an unnecessary place.

Is there any way to control it? Or what can I do to improve my attitude? Especially, if I'm adding some text and graphs, then it will not look good on page 4 on the empty space.

  \ documentclass {article} \ usepackage {Sweave} \ usepackage {longtable} \ Usepackage {booktabs} \ start {document} \ swivoupt {concordance = TRUE} I want to include this long Am & lt; Tab.R, echo = FALSE, result = tex> & Gt; = Library (HMISC) # Library (Ext.) X & LT; - Matrix (rnorm (1000), ncol = 10) x.big & lt; - Data. Frame (X) latex (X.big, "", file = "", long = TRUE, dec = 2, caption = 'firstly spatial is spread on many pages') @ Add a graph ... and then another table & lt; & Lt; Tab.R, resonance = FALSE, result = tex & gt; & Gt; = Latex (x.big, "", file = "", longtable = TRUE, dec = 2, caption = 'wrong second long lasting') @ \ end {document}   < Do not give this question to the latex group, it is a problem of HMICC / latex, which can be found in the  in Texas 

combines each of the 40 lines by default, check the parameter lines.page = 40 of latex . I do not understand why this default is set, but
  latex (x.big, "", file = "", longtable = TRUE, dec = 2, caption = 'Seconds'   

takes you around the problem.

Comments