Description Usage Arguments Value SweaveListingoptions Global Options Author(s) See Also Examples
View source: R/SweaveListingOptions.R
With SweaveListingOptions
you can inspect and change
the global variables of the package SweaveListingUtils.
1 2 3 |
... |
any options can be defined, using name = value or by passing a list of such tagged values. |
x |
a character string holding an option name. |
SweaveListingOptions()
returns a list of the global variables.
SweaveListingOptions(x)
returns the global variable x.
getSweaveListingOption(x)
returns the global variable x.
SweaveListingOptions(x=y)
sets the value of the global variable x to y.
For compatibility with spelling in package distr, SweaveListingoptions
is
just a synonym to SweaveListingOptions
.
default setting for \lstset-definition of R-code, default value is
list("fancyvrb" = "true", "language" = "R", "escapechar" = "`",
"basicstyle" = "{\\color{Rcolor}\\footnotesize}",
"keywordstyle" = "{\\bf\\color{Rcolor}}",
"commentstyle" = "{\\color{Rcomment}\\ttfamily\\itshape}",
"literate" = "{<-}{{$\\leftarrow$}}2{<<-}{{$\\twoheadleftarrow$}}2",
"alsoother" = "{$}","alsoletter" = "{.<-}"
"otherkeywords" = "{!,!=,~,$,*,\\&,\\%/\\%,\\%*\\%,\\%\\%,<-,<<-,/}")
default setting for \lstset-definition of Rd-code, default value is
list("fancyvrb" = "true", "language" = "Rd",
"basicstyle" = "{\\color{black}\\tiny}",
"keywordstyle" = "{\\bf}",
"commentstyle" = "\\ttfamily\\itshape",
"alsolanguage" = "R")
default setting for \lstdefinestyle-definition of Rinstyle
(for R input),
default value is
list("style" = "Rstyle", "fancyvrb" = "true",
"basicstyle" = "\\color{Rcolor}\\small")
default setting for \lstdefinestyle-definition of Routstyle
(for R output),
default value is
list("fancyvrb" = "false", "basicstyle" = "\\color{Rout}\\small")
default setting for \lstdefinestyle-definition of Rcodestyle
(for R code),
default value is
list("style" = "Rstyle", "fancyvrb" = "true",
"basicstyle" = "\\color{Rcolor}\\small")
"fontshape"= "sl", "basicstyle" = "\\color{Rcolor}")
default setting for color of R-code in rgb-coordinates;
defaults to c(0,0.5,0.5)
default setting for color of R-code from recommended packages in rgb-coordinates;
defaults to c(0,0.6,0.4)
default setting for color of R-code symbols of intermediate packages
in rgb-coordinates; defaults to c(0,0.6,0.6)
default setting for color of R-output in rgb-coordinates;
defaults to c(0.461,0.039,0.102)
default setting for color of R-comments in rgb-coordinates;
defaults to c(0.101,0.043,0.432)
default setting for package version as character;
defaults to "2.0.2"
logical; default setting for masked functions library
and require
;
shall they show Sweave-behaviour? defaults to FALSE
default setting for R-symbols as character;
defaults to "{\\bf}"
default setting for R-symbols in an intermediate package as character;
defaults to "{\\bf\\color{Rbcolor}}"
default setting for R-symbols in package base or
another recommended package as character;
defaults to "{\\bf\\color{Recomdcolor}}"
default setting: shall symbols from automatically loaded
intermediate packages also be registered for listings-printing?
defaults to TRUE
default setting: shall R symbols already defined in the
original R language definition in ‘lstlang3.sty’ be overwritten
if they reappear in a required package (to be printed in a
different keywordstyle)?
defaults to FALSE
default setting: logical: shall code sniplets be drawn from
"r-forge.r-project.org" (or a mirror) or not; defaults to
TRUE
.
default setting for the base url to download code sniplets from
(character); defaults to
"http://r-forge.r-project.org/plugins/scmsvn/viewcvs.php/*checkout*/pkg/"
logical; default for argument add
in command Rset
;
defaults to TRUE
logical; default for argument add
in command Rdset
;
defaults to TRUE
logical; default for argument add
in command
Rinset
; defaults to TRUE
logical; default for argument add
in command
Routset
; defaults to TRUE
logical; default for argument add
in command
Rcodeset
; defaults to TRUE
character; the TeX code to define TeX command \file
;
defaults to "\def\file#1{{\tt #1}}"
character; the TeX code to define TeX command \pkg
;
defaults to "\def\pkg#1{{\tt \"#1\"}}"
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de
1 2 3 4 5 6 | SweaveListingOptions()
SweaveListingOptions("Rout")
SweaveListingOptions("Rout" = c(0,0,0))
# or
SweaveListingOptions(Rout = c(0,1,0))
getSweaveListingOption("Rout")
|
Loading required package: startupmsg
:startupmsg> Utilities for Start-Up Messages (version 0.9.5)
:startupmsg>
:startupmsg> For more information see ?"startupmsg",
:startupmsg> NEWS("startupmsg")
:SweaveListingUtils> Utilities for Sweave Together with
:SweaveListingUtils> TeX 'listings' Package (version
:SweaveListingUtils> 0.7.7)
:SweaveListingUtils>
:SweaveListingUtils> NOTE: Support for this package
:SweaveListingUtils> will stop soon.
:SweaveListingUtils>
:SweaveListingUtils> Package 'knitr' is providing the
:SweaveListingUtils> same functionality in a better
:SweaveListingUtils> way.
:SweaveListingUtils>
:SweaveListingUtils> Some functions from package 'base'
:SweaveListingUtils> are intentionally masked ---see
:SweaveListingUtils> SweaveListingMASK().
:SweaveListingUtils>
:SweaveListingUtils> Note that global options are
:SweaveListingUtils> controlled by
:SweaveListingUtils> SweaveListingoptions() ---c.f.
:SweaveListingUtils> ?"SweaveListingoptions".
:SweaveListingUtils>
:SweaveListingUtils> For more information see
:SweaveListingUtils> ?"SweaveListingUtils",
:SweaveListingUtils> NEWS("SweaveListingUtils")
:SweaveListingUtils> There is a vignette to this
:SweaveListingUtils> package; try
:SweaveListingUtils> vignette("ExampleSweaveListingUtils").
Attaching package: 'SweaveListingUtils'
The following objects are masked from 'package:base':
library, require
$Rset
$Rset$fancyvrb
[1] "true"
$Rset$escapechar
[1] "`"
$Rset$extendedchars
[1] "false"
$Rset$language
[1] "R"
$Rset$basicstyle
[1] "{\\color{Rcolor}\\small}"
$Rset$keywordstyle
[1] "{\\bf\\color{Rcolor}}"
$Rset$commentstyle
[1] "{\\color{Rcommentcolor}\\ttfamily\\itshape}"
$Rset$literate
[1] "{\"}{\\texttt{\"}}1{<-}{{$\\leftarrow$}}2{<<-}{{$\\twoheadleftarrow$}}2{~}{{$\\sim$}}1{<=}{{$\\leq$}}2{>=}{{$\\geq$}}2{^}{{$\\scriptstyle\\wedge$}}1"
$Rset$alsoother
[1] "{$}"
$Rset$alsoletter
[1] "{.<-}"
$Rset$otherkeywords
[1] "{!,!=,~,$,*,\\&,\\%/\\%,\\%*\\%,\\%\\%,<-,<<-,/}"
$Rset$escapeinside
[1] "{(*}{*)}"
$Rdset
$Rdset$fancyvrb
[1] "true"
$Rdset$language
[1] "Rd"
$Rdset$keywordstyle
[1] "{\\bf}"
$Rdset$basicstyle
[1] "{\\color{black}\\footnotesize}"
$Rdset$commentstyle
[1] "{\\ttfamily\\itshape}"
$Rdset$alsolanguage
[1] "R"
$Rin
$Rin$style
[1] "Rstyle"
$Rin$fancyvrb
[1] "true"
$Rin$basicstyle
[1] "\\color{Rcolor}\\small"
$Rout
$Rout$fancyvrb
[1] "false"
$Rout$basicstyle
[1] "\\color{Routcolor}\\small"
$Rcode
$Rcode$style
[1] "Rstyle"
$Rcode$fancyvrb
[1] "true"
$Rcode$fontshape
[1] "sl"
$Rcode$basicstyle
[1] "\\color{Rcolor}"
$Rcolor
[1] 0.0 0.5 0.5
$RRecomdcolor
[1] 0.0 0.6 0.4
$Rbcolor
[1] 0.0 0.6 0.6
$Routcolor
[1] 0.461 0.039 0.102
$Rcommentcolor
[1] 0.101 0.043 0.432
$pkv
[1] "2.5"
$pkg
[1] "distr"
$Keywordstyle
[1] "{\\bf}"
$Recomd.Keywordstyle
[1] "{\\bf\\color{RRecomdcolor}}"
$interm.Keywordstyle
[1] "{\\bf\\color{Rbcolor}}"
$overwrite
[1] FALSE
$intermediate
[1] TRUE
$inSweave
[1] FALSE
$fromRForge
[1] TRUE
$base.url
[1] "http://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/"
$addRset
[1] TRUE
$addRdset
[1] TRUE
$addRinset
[1] TRUE
$addRoutset
[1] TRUE
$addRcodeset
[1] TRUE
$fileCommand
[1] "\\def\\file#1{{\\tt #1}}"
$pkgCommand
[1] "\\def\\pkg#1{{\\tt \"#1\"}}"
$Rout
$Rout$fancyvrb
[1] "false"
$Rout$basicstyle
[1] "\\color{Routcolor}\\small"
[1] 0 1 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.