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

William Revelle lists at revelle.net
Thu Jun 14 01:04:00 CEST 2007


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?   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



More information about the R-SIG-Mac mailing list