knitr: code in chunks gets wrapped unexpectedly
问题 In a beamer presentation using knit2pdf() and LaTeX, I sometimes find that code in chunks gets wrapped, even though I have set tidy=FALSE globally. For example, this chunk: \item Fit this using \func{glm}: <<berk-logit2, size='footnotesize'>>= berkeley <- as.data.frame(UCBAdmissions) berk.logit2 <- glm(Admit == "Admitted" ~ Dept + Gender, data = berkeley, weights = Freq, family = "binomial") @ Appears like this: Note that all three lines are wrapped, as if in paragraph mode. The indented line