cleanLyxRnw {svSweave}R Documentation

Clean up R noweb files produced by LyX with SciViews Sweave module

Description

The SciViews-LyX extension defines rchunk commands to contain R chunks (embedded R code processed by Sweave). Unfortunately, LyX use to write two line feed for each line of code, introducing extra lines in the R chunks. Moreover, tabulations are interpreted as 8 spaces, while R code use to consider a tabulation as equivalent to 4 spaces. cleanLyxRnw() corrects these little problems, and it should not affect R noweb files produced by a different software.

Usage

cleanLyxRnw(RnwCon, RnwCon2 = RnwCon)

Arguments

RnwCon A connection object or a character string corresponding to the path to a R noweb file to be read
RnwCon2 Idem, but where the cleaned up R noweb file should be written (by default, on the same file or connection)

Value

NULL, this function is invoked for its side effect.

Author(s)

Philippe Grosjean <phgrosjean@sciviews.org>


[Package svSweave version 0.9-1 Index]