[Bioc-devel] executable vignette?
James W. MacDonald
jmacdon at med.umich.edu
Thu Aug 2 22:33:43 CEST 2007
Hi Christian,
cstrato wrote:
> Dear all
>
> Can you tell me when is a vignette for a package, e.g. "mypkg", an
> executable file?
> How can I avoid that my vignette is an executable file?
> Is there something special that I have to add to my vignette?
Not sure what you are getting at here. Why would you have a vignette
that isn't executable? That is the main rationale for having one in the
first place.
If you want to make certain code chunks not evaluated, you can put
<<eval=false>>=
in the chunk header. This will also cause that chunk to be commented out
if someone were to Stangle() your .Rnw file. Of course that won't keep a
determined person from executing your code, but it will keep it from
executing unintentionally.
Best,
Jim
>
> In "mypkg" the vignette with example name "mypkg.Snw" is located in
> subdirectory
> "inst/doc" as suspected, and it looks as follows:
>
> %\VignetteIndexEntry{MyPkg Vignette: Overview}
> %\VignetteDepends{mypkg}
> %\VignetteKeywords{Expression}
> %\VignettePackage{mypkg}
> \documentclass{article}
>
> \usepackage{hyperref}
>
> \textwidth=6.2in
> \textheight=8.5in
> %\parskip=.3cm
> \oddsidemargin=.1in
> \evensidemargin=.1in
> \headheight=-.3in
>
> \newcommand{\Rfunction}[1]{{\texttt{#1}}}
> \newcommand{\Rmethod}[1]{{\texttt{#1}}}
> \newcommand{\Rcode}[1]{{\texttt{#1}}}
> \newcommand{\Robject}[1]{{\texttt{#1}}}
> \newcommand{\Rpackage}[1]{{\textsf{#1}}}
> \newcommand{\Rclass}[1]{{\textit{#1}}}
> \newcommand{\mypkg}{\Rpackage{mypkg}}
>
> \begin{document}
>
> \title{Introduction}
> \date{July, 2007}
> \author{Christian Stratowa}
> \maketitle
>
> \tableofcontents
>
> \section{Introduction}
>
> some text
>
> <<>>=
> library(mypkg)
> @
>
> some text
>
> \end{document}
>
>
> Thank you in advance
> Best regards
> Christian
> _._._._._._._._._._._._._._._._
> C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a
> V.i.e.n.n.a A.u.s.t.r.i.a
> _._._._._._._._._._._._._._._._
>
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
--
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
More information about the Bioc-devel
mailing list