Hello,
I'm trying to demonstrate the behaviour of my R package and how line directives change that behaviour. So I've got an R chunk like this: <<keep.source=TRUE>>= { #line 1 "file1.R" fun <- function() { pkg::fun() } #line 1 "file2.R" fun() } @ but when it is rendered, the line directives do not appear: > { + fun <- function() { + pkg::fun() + } + + + fun() + } I tried faking a line directive by writing it twice: <<keep.source=TRUE>>= { #line 1 "file1.R" #line 1 "file1.R" fun <- function() { pkg::fun() } #line 1 "file2.R" #line 1 "file2.R" fun() } @ but then the rendered fake line directive looks bad because it's out by one space so if it is copy-pasted, it wouldn't actually function as shown. So is there an option I can set to have the line directives displayed, or something else I can change to get it working? Thank you! ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.