Displaying 1 result from an estimated 1 matches for "parstart".
Did you mean:
pa_start
2011 Apr 15
1
Sweave and Slides (Beamer)
...proved.
<<paragraphs,echo=FALSE>>=
## Something for breaking up long output into "paragraphs".
paragraphs <- function(x) {
text <- capture.output(x)
blanklines <- (1:length(text))[text == ""]
if (blanklines[1] != 1) blanklines <- c(-1,blanklines)
parstarts <- blanklines + 1
parends <- c(blanklines[-1] - 1, length(text))
npar <- length(parstarts)
res <- list()
for (i in 1:npar) res <- c(res, list(text[parstarts[i]:parends[i]]))
class(res) <- c("paragraphs", res$class)
res
}
as.paragraphs <- paragraphs
assign...