[R-SIG-Mac] query re ">" in Sweave output for Mac input
    Seth Falcon 
    sfalcon at fhcrc.org
       
    Thu Jun 14 01:58:25 CEST 2007
    
    
  
William Revelle <lists at revelle.net> writes:
> 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.
Another option is to give students the .R file produced using
Stangle.  The disadvantage is this is a separate file and students
will need to keep track of which chunk to copy/paste.  In addition to
solving the prompt related syntax errors, it encourages students to
make small changes to the code to explore questions and this can have
a lot of value.
+ seth
-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org
    
    
More information about the R-SIG-Mac
mailing list