[R-SIG-Mac] query re ">" in Sweave output for Mac input

Simon Urbanek simon.urbanek at r-project.org
Thu Jun 14 03:11:16 CEST 2007

On Jun 13, 2007, at 7:04 PM, William Revelle wrote:

> Dear R Mac users,
> When writing examples for students, I typically use Sweave to
> integrate the R code with the output.  R code from Sweave
> conventionally is preceded by the  prompt character (typically ">").
> Although this can be suppressed in Sweave, it seems as if the
> conventional style is to include the prompt on every example line.
> This leads to a syntax error on every line copied from a Sweave
> example directly into R.
> Now my question:
> Is there some option in the Mac R-Gui that I have missed that allows
> me to directly paste Sweave output of commands (i.e., including the
> prompt) into R without first editing them out in the editor?  I think
> that this is possible in Windows (but have only been told that by my
> students).
> If it is not possible, then what do people think about example code
> not including the prompt?

No, but it is on the wishlist

Unfortunately I don't think I'll have time to look into this soon,  
but patches of R.app implementing this are highly welcome.


>   It  makes it easier to cut and paste from
> sample text, but makes it harder to spot the code in the sample text.
> (For my web based examples I get around this by color coding the R
> commands , but I am worrying about pdf examples).
> Thanks for suggestions and help.
> Bill
> -- 
> William Revelle		http://personality-project.org/revelle.html
> Professor			http://personality-project.org/personality.html
> Department of Psychology       http://www.wcas.northwestern.edu/psych/
> Northwestern University	http://www.northwestern.edu/
> Use R for statistics:                 http://personality-project.org/r
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

More information about the R-SIG-Mac mailing list