SweaveListingOptions: Function to change the global options of the package...

Description Usage Arguments Value SweaveListingoptions Global Options Author(s) See Also Examples

Description

With SweaveListingOptions you can inspect and change the global variables of the package SweaveListingUtils.

Usage

1
2
3

Arguments

...

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.

Value

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.

SweaveListingoptions

For compatibility with spelling in package distr, SweaveListingoptions is just a synonym to SweaveListingOptions.

Global Options

Rset:

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" = "{!,!=,~,$,*,\\&,\\%/\\%,\\%*\\%,\\%\\%,<-,<<-,/}")

Rdset:

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")

Rin:

default setting for \lstdefinestyle-definition of Rinstyle (for R input), default value is
list("style" = "Rstyle", "fancyvrb" = "true",
"basicstyle" = "\\color{Rcolor}\\small")

Rout:

default setting for \lstdefinestyle-definition of Routstyle (for R output), default value is
list("fancyvrb" = "false", "basicstyle" = "\\color{Rout}\\small")

Rcode:

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}")

Rcolor:

default setting for color of R-code in rgb-coordinates; defaults to c(0,0.5,0.5)

RRecomdcolor:

default setting for color of R-code from recommended packages in rgb-coordinates; defaults to c(0,0.6,0.4)

Rbcolor:

default setting for color of R-code symbols of intermediate packages in rgb-coordinates; defaults to c(0,0.6,0.6)

Routcolor:

default setting for color of R-output in rgb-coordinates; defaults to c(0.461,0.039,0.102)

Rcommentcolor:

default setting for color of R-comments in rgb-coordinates; defaults to c(0.101,0.043,0.432)

pkv:

default setting for package version as character; defaults to "2.0.2"

inSweave:

logical; default setting for masked functions library and require; shall they show Sweave-behaviour? defaults to FALSE

Keywordstyle:

default setting for R-symbols as character; defaults to "{\\bf}"

interm.Keywordstyle:

default setting for R-symbols in an intermediate package as character; defaults to "{\\bf\\color{Rbcolor}}"

Recomd.Keywordstyle:

default setting for R-symbols in package base or another recommended package as character; defaults to "{\\bf\\color{Recomdcolor}}"

intermediate:

default setting: shall symbols from automatically loaded intermediate packages also be registered for listings-printing? defaults to TRUE

overwrite:

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

fromRForge:

default setting: logical: shall code sniplets be drawn from "r-forge.r-project.org" (or a mirror) or not; defaults to TRUE.

base.url:

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/"

addRset:

logical; default for argument add in command Rset; defaults to TRUE

addRdset:

logical; default for argument add in command Rdset; defaults to TRUE

addRinset:

logical; default for argument add in command Rinset; defaults to TRUE

addRoutset:

logical; default for argument add in command Routset; defaults to TRUE

addRcodeset:

logical; default for argument add in command Rcodeset; defaults to TRUE

fileCommand:

character; the TeX code to define TeX command \file; defaults to "\def\file#1{{\tt #1}}"

pkgCommand:

character; the TeX code to define TeX command \pkg; defaults to "\def\pkg#1{{\tt \"#1\"}}"

Author(s)

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de

See Also

options, getOption

Examples

1
2
3
4
5
6

Example output

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

SweaveListingUtils documentation built on May 2, 2019, 6:49 p.m.